private void _send(Notification notification) { try { OnSend?.Invoke(notification); } catch (Exception err) { System.Diagnostics.Debug.WriteLine("SEND CALLBACK FAILED: " + err.Message); } }
private void ProcessSend(object sender, SocketAsyncEventArgs e) { logger?.Info($"Session.ProcessSend: this={GetHashCode()}, e.SocketError={e?.SocketError}"); if (e.SocketError == SocketError.Success && 0 < e.BytesTransferred) { SendCallback?.Invoke(sender, new SessionEventArgs { BytesTransferred = e.BytesTransferred }); } else { CloseSocket(e); } }