Exemple #1
0
 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;
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Invoke the DataReceived event, called whenever the client has finished sending data.
 /// </summary>
 protected virtual void OnDataReceived(DataReceivedEventArgs e)
 {
     DataReceived?.Invoke(this, e);
 }
Exemple #3
0
 /// <summary>
 /// Invoke the DataReceived event, called whenever the client has finished sending data.
 /// </summary>
 protected virtual void OnDataReceived(DataReceivedEventArgs e)
 {
     DataReceived?.Invoke(this, e);
 }