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); }
private void RaiseServerDataReceived(byte[] data, int dataOffset, int dataLength) { ServerDataReceived?.Invoke(this, new TcpServerDataReceivedEventArgs(this, data, dataOffset, dataLength)); }
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); }