コード例 #1
0
ファイル: UdpSingleServer.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// On web context receive handler.
 /// </summary>
 /// <param name="sender">The application sender.</param>
 /// <param name="server">The UDP server.</param>
 /// <param name="data">The data from the client.</param>
 /// <param name="endpoint">The client endpoint sending the data.</param>
 private void ManagerServer_OnWebContext(object sender, Nequeo.Net.Sockets.IUdpSingleServer server, byte[] data, IPEndPoint endpoint)
 {
     // If the event has been assigned.
     if (OnContext != null)
     {
         OnContext(this, server, data, endpoint);
     }
 }
コード例 #2
0
 /// <summary>
 /// Recevied data handler.
 /// </summary>
 /// <param name="server">The UDP server.</param>
 /// <param name="data">The data received.</param>
 /// <param name="endpoint">The end point of the client sendind the data.</param>
 private void ReceivedHandler(Nequeo.Net.Sockets.IUdpSingleServer server, byte[] data, IPEndPoint endpoint)
 {
     // Send the received to the caller.
     if (_onReceivedActionHandler != null)
     {
         // Send the data to the handler.
         _onReceivedActionHandler(server, data, endpoint);
     }
 }
コード例 #3
0
ファイル: WebServer.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// On received action handler.
 /// </summary>
 /// <param name="server">The UDP server.</param>
 /// <param name="data">The data from the client.</param>
 /// <param name="endpoint">The client endpoint sending the data.</param>
 private void OnReceivedActionHandler(Nequeo.Net.Sockets.IUdpSingleServer server, byte[] data, IPEndPoint endpoint)
 {
     try
     {
         // If the event has been assigned.
         if (OnWebContext != null)
         {
             OnWebContext(this, server, data, endpoint);
         }
     }
     catch { }
 }