private void FireOnReceived(BaseSocketConnection connection, byte[] buffer, bool readCanEnqueue) { if (connection.Active) { if (!readCanEnqueue) { lock (connection.SyncReadCount) { connection.ReadCanEnqueue = false; } } FSocketService.OnReceived(new MessageEventArgs(connection, buffer, false)); if (!readCanEnqueue) { lock (connection.SyncReadCount) { connection.ReadCanEnqueue = true; } } } }