private ZmqInboundSocket CreateInboundSocket(InboundProcStartSequenceState state) { ZmqInboundSocket inboundSocket = null; try { inboundSocket = new ZmqInboundSocket(_context, PeerId, _configuredInboundEndPoint, _socketOptions, _environment); _realInboundEndPoint = inboundSocket.Bind(); return(inboundSocket); } catch (Exception ex) { state.SetFailed(ex); if (inboundSocket != null) { inboundSocket.Dispose(); } return(null); } finally { state.Release(); } }
private void GracefullyDisconnectInboundSocket(ZmqInboundSocket inboundSocket, MutableMemoryStream inputBuffer) { inboundSocket.Disconnect(); while (inboundSocket.TryReceive(inputBuffer, 100.Milliseconds())) { DeserializeAndForwardTransportMessage(inputBuffer); } }
private void GracefullyDisconnectInboundSocket(ZmqInboundSocket inboundSocket) { inboundSocket.Disconnect(); CodedInputStream inputStream; while ((inputStream = inboundSocket.Receive(100.Milliseconds())) != null) { DeserializeAndForwardTransportMessage(inputStream); } }
private void GracefullyDisconnectInboundSocket(ZmqInboundSocket inboundSocket) { inboundSocket.Disconnect(); ProtoBufferReader?bufferReader; while ((bufferReader = inboundSocket.Receive(100.Milliseconds())) != null) { DeserializeAndForwardTransportMessage(bufferReader); } }