예제 #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);
 }
 /// <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);
 }