private void OnDataRecieved(object sender, SocketMessageEventArgs e) { parserStream.Write(e.Buffer, 0, e.Buffer.Length); RdapMessage rdapMessage; if (!parser.TryParseMessage(out rdapMessage)) return; OnDataRecieveEvent(rdapMessage.ToBytes()); }
private void OnDataRecieved(object sender, SocketMessageEventArgs e) { sessionContext.Process(e.Buffer, 0, e.Buffer.Length); }
static void publisher_OnDataRecieved(object sender, SocketMessageEventArgs e) { Console.WriteLine(StringHelper.GetStringFromAscii(e.Buffer, 0, e.Buffer.Length)); }
private void OnDataRecieved(object sender, SocketMessageEventArgs e) { lock (this) { parserStream.Write(e.Buffer, 0, e.Buffer.Length); RdapMessage rdapMessage; if (!parser.TryParseMessage(out rdapMessage)) return; switch (rdapMessage.MessageType) { case RdapMessageType.MouseClickEventMessage: DoMouseClick(rdapMessage); break; case RdapMessageType.MouseDragEventMesssage: DoMouseDrag(rdapMessage); break; case RdapMessageType.KeyboardEventMessage: DoKeyStroke(rdapMessage); break; } } }