protected override void BackendHandler(object sender, NetMQSocketEventArgs args) { bool more; do { var data = args.Socket.Receive(out more) ?? new byte[] { }; if (more) { FrontendSocket.SendMore(data); } else { FrontendSocket.Send(data); } } while (more); }
/// <summary> /// Forwards requests from the frontend socket to the backend socket. /// </summary> protected override bool FrontendHandler(ZSocket args, out ZMessage message, out ZError error) { return(FrontendSocket.Forward(BackendSocket, out message, out error)); }
/// <summary> /// Forwards requests from the frontend socket to the backend socket. /// </summary> /// <param name="args">A <see cref="SocketEventArgs"/> object containing the poll event args.</param> protected override void FrontendHandler(SocketEventArgs args) { FrontendSocket.Forward(BackendSocket); }