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();
}
}
}