コード例 #1
0
 protected HandleResult SDK_OnReceive(IntPtr pSender, IntPtr connId, IntPtr pData, int length)
 {
     if (ServerDataReceived != null)
     {
         byte[] bytes = new byte[length];
         Marshal.Copy(pData, bytes, 0, length);
         ServerDataReceived.Invoke(this, connId, bytes);
     }
     return(HandleResult.Ignore);
 }
コード例 #2
0
 private void RaiseServerDataReceived(byte[] data, int dataOffset, int dataLength)
 {
     ServerDataReceived?.Invoke(this, new TcpServerDataReceivedEventArgs(this, data, dataOffset, dataLength));
 }
コード例 #3
0
 private void ServerProcessOnOutputDataReceived(object sender, DataReceivedEventArgs e)
 {
     ServerDataReceived?.Invoke(sender, e);
 }
コード例 #4
0
 /// <summary>
 /// The server's data receive event caller.
 /// </summary>
 /// <param name="e">Asynchronous event args</param>
 protected virtual void OnServerDataReceived(AsyncCompletedEventArgs e)
 {
     ServerDataReceived?.Invoke(this, e);
 }