Example #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);
 }
Example #2
0
 private void RaiseServerDataReceived(byte[] data, int dataOffset, int dataLength)
 {
     ServerDataReceived?.Invoke(this, new TcpServerDataReceivedEventArgs(this, data, dataOffset, dataLength));
 }
Example #3
0
 private void ServerProcessOnOutputDataReceived(object sender, DataReceivedEventArgs e)
 {
     ServerDataReceived?.Invoke(sender, e);
 }
 /// <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);
 }