Gwupe.Cloud.Communication.CoupledConnection.ProcessStream C# (CSharp) Method

ProcessStream() private method

private ProcessStream ( WebSocketConnection aconnection, int acode, MemoryStream adata ) : void
aconnection Bauglir.Ex.WebSocketConnection
acode int
adata System.IO.MemoryStream
return void
        private void ProcessStream(WebSocketConnection aconnection, int acode, MemoryStream adata)
        {
            Logger.Debug("Received binary message of size " + adata.Length);
            adata.Position = 0;
            if (_readData != null)
            {
                try
                {
                    if (!_readData(adata))
                    {
                        Close();
                    }
                }
                catch (Exception e)
                {
                    Logger.ErrorFormat("Failed to call read data : " + e.Message, e);
                    Close();
                }
            }
        }