private void UpdateChannel(AChannel channel)
{
if (channel.Id == 0)
{
return;
}
while (true)
{
byte[] messageBytes = channel.Recv();
if (messageBytes == null)
{
return;
}
if (messageBytes.Length < 6)
{
continue;
}
Opcode opcode = (Opcode)BitConverter.ToUInt16(messageBytes, 0);
try
{
this.Run(opcode, messageBytes);
}
catch (Exception e)
{
Log.Error(e.ToString());
}
}
}