void DataReceivedFromClient(object sender, DataReceivedEventArgs e) { var sconn = sender as WebSocketConnection; if (sconn != null) { switch (e.Data) { case "communication test": sconn.Send("communication success"); break; } } }
/// <summary> /// Invoke the DataReceived event, called whenever the client has finished sending data. /// </summary> protected virtual void OnDataReceived(DataReceivedEventArgs e) { DataReceived?.Invoke(this, e); }
/// <summary> /// Invoke the DataReceived event, called whenever the client has finished sending data. /// </summary> protected virtual void OnDataReceived(DataReceivedEventArgs e) { DataReceived?.Invoke(this, e); }