コード例 #1
0
ファイル: WebSocketServer.cs プロジェクト: jjmata/iSpy
 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;
         }
     }
 }
コード例 #2
0
ファイル: WebSocketConnection.cs プロジェクト: tdhieu/iSpy
 /// <summary>
 /// Invoke the DataReceived event, called whenever the client has finished sending data.
 /// </summary>
 protected virtual void OnDataReceived(DataReceivedEventArgs e)
 {
     DataReceived?.Invoke(this, e);
 }
コード例 #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);
 }