protected virtual void OnMessageArrived (SocketMessageEventArgs e) { MessageArrivedEventHandler handler = MessageArrived; if (handler != null) { handler (this, e); } }
private void WebSocket_OnMessage (object sender, MessageEventArgs e) { SocketMessageEventArgs eventArgs = new SocketMessageEventArgs (); eventArgs.Message = e.Data; OnMessageArrived (eventArgs); }
/// <summary> /// Event fired when message arrived from the socket. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">Eevent Arguments</param> private void Socket_MessageArrived (object sender, SocketMessageEventArgs args) { HandleMessage (args.Message); }