private void ReadCallback(IAsyncResult ar) { var readBytes = _server.EndRead(ar); if (readBytes > 0) { var message = (Message)ar.AsyncState; OnClientMessage?.Invoke(message.Buffer); } OnDisconnected(); }
public void OnIncomingClientMessage(ServerRouterSession client, RouterMessage msg) { OnClientMessage?.Invoke((T)client, msg); }