public SessionBase(IOThread ioThread, bool connect, SocketBase socket, Options options, Address addr) : base(ioThread, options) { m_ioObject = new IOObject(ioThread); m_connect = connect; m_pipe = null; m_incompleteIn = false; m_pending = false; m_engine = null; m_socket = socket; m_ioThread = ioThread; m_hasLingerTimer = false; m_identitySent = false; m_identityReceived = false; m_addr = addr; if (options.RawSocket) { m_identitySent = true; m_identityReceived = true; } m_terminatingPipes = new HashSet<Pipe>(); }
public PgmSession(PgmSocket pgmSocket, Options options) { m_handle = pgmSocket.FD; m_pgmSocket = pgmSocket; m_options = options; data = new byte[Config.PgmMaxTPDU]; }
public PgmListener(IOThread ioThread, SocketBase socket, Options options) : base(ioThread, options) { m_socket = socket; m_ioObject = new IOObject(ioThread); }
public TcpListener(IOThread ioThread, SocketBase socket, Options options) : base(ioThread, options) { m_ioObject = new IOObject(ioThread); m_address = new TcpAddress(); m_handle = null; m_socket = socket; }
/// <summary> Initializes a new instance of the <see cref="Own" /> class that is running on a thread outside of 0MQ infrastructure. </summary> /// <param name="parent">The parent context.</param> /// <param name="threadId">The thread id.</param> /// <remarks> Note that the owner is unspecified in the constructor. It'll be assigned later on using <see cref="SetOwner"/> /// when the object is plugged in. </remarks> protected Own(Ctx parent, int threadId) : base(parent, threadId) { m_terminating = false; m_processedSeqnum = 0; m_owner = null; m_termAcks = 0; m_options = new Options(); }
public PgmSender(IOThread ioThread, Options options, Address addr) : base(ioThread) { m_options = options; m_addr = addr; m_encoder = null; m_outBuffer = null; m_outBufferSize = 0; m_writeSize = 0; m_encoder = new Encoder(0, m_options.Endian); }
// The object is living within I/O thread. public Own(IOThread ioThread, Options options) : base(ioThread) { m_options = options; m_terminating = false; m_sentSeqnum = new AtomicLong(0); m_processedSeqnum = 0; m_owner = null; m_termAcks = 0; owned = new HashSet<Own>(); }
// Note that the owner is unspecified in the constructor. // It'll be supplied later on when the object is plugged in. // The object is not living within an I/O thread. It has it's own // thread outside of 0MQ infrastructure. public Own(Ctx parent, int tid) : base(parent, tid) { m_terminating = false; m_sentSeqnum = new AtomicLong(0); m_processedSeqnum = 0; m_owner = null; m_termAcks = 0; m_options = new Options(); owned = new HashSet<Own>(); }
public TcpConnecter(IOThread ioThread, SessionBase session, Options options, Address addr, bool delayedStart) : base(ioThread, options) { m_ioObject = new IOObject(ioThread); m_addr = addr; m_handle = null; m_handleValid = false; m_delayedStart = delayedStart; m_timerStarted = false; m_session = session; m_currentReconnectIvl = m_options.ReconnectIvl; Debug.Assert(m_addr != null); m_endpoint = m_addr.ToString(); m_socket = session.Socket; }
public ReqSession(IOThread ioThread, bool connect, SocketBase socket, Options options, Address addr) : base(ioThread, connect, socket, options, addr) { m_state = State.Identity; }
public StreamEngine(Socket fd, Options options, String endpoint) { m_handle = fd; // inbuf = null; m_insize = 0; m_inputError = false; // outbuf = null; m_outsize = 0; m_handshaking = true; m_session = null; m_options = options; m_plugged = false; m_endpoint = endpoint; m_socket = null; m_encoder = null; m_decoder = null; // Put the socket into non-blocking mode. Utils.UnblockSocket(m_handle); // Set the socket buffer limits for the underlying socket. if (m_options.SendBuffer != 0) { m_handle.SendBufferSize = m_options.SendBuffer; } if (m_options.ReceiveBuffer != 0) { m_handle.ReceiveBufferSize = m_options.ReceiveBuffer; } }
public RouterSession(IOThread ioThread, bool connect, SocketBase socket, Options options, Address addr) : base(ioThread, connect, socket, options, addr) { }
public IpcListener(IOThread ioThread, SocketBase socket, Options options) : base(ioThread, socket, options) { m_address = new IpcAddress(); }
public Endpoint(SocketBase socket, Options options) { Socket = socket; Options = options; }
public static SessionBase Create(IOThread ioThread, bool connect, SocketBase socket, Options options, Address addr) { SessionBase s; switch (options.SocketType) { case ZmqSocketType.Req: s = new Req.ReqSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Dealer: s = new Dealer.DealerSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Rep: s = new Rep.RepSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Router: s = new Router.RouterSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Pub: s = new Pub.PubSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Xpub: s = new XPub.XPubSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Sub: s = new Sub.SubSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Xsub: s = new XSub.XSubSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Push: s = new Push.PushSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Pull: s = new Pull.PullSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Pair: s = new Pair.PairSession(ioThread, connect, socket, options, addr); break; case ZmqSocketType.Stream: s = new Stream.StreamSession(ioThread, connect, socket, options, addr); break; default: throw InvalidException.Create("type=" + options.SocketType); } return s; }
public PgmSocket(Options options, PgmSocketType pgmSocketType, PgmAddress pgmAddress) { m_options = options; m_pgmSocketType = pgmSocketType; m_pgmAddress = pgmAddress; }
/// <summary> /// Initializes a new instance of the <see cref="Own" /> class that is running on a thread outside of 0MQ infrastructure. /// </summary> /// <param name="parent">The parent context.</param> /// <param name="threadId">The thread id.</param> /// <remarks> /// Note that the owner is unspecified in the constructor. It'll be assigned later on using <see cref="SetOwner"/> /// when the object is plugged in. /// </remarks> protected Own([NotNull] Ctx parent, int threadId) : base(parent, threadId) { m_options = new Options(); }
/// <summary> Initializes a new instance of the <see cref="Own" /> class that is running within I/O thread. </summary> /// <param name="ioThread">The I/O thread.</param> /// <param name="options">The options.</param> /// <remarks> Note that the owner is unspecified in the constructor. It'll be assigned later on using <see cref="SetOwner"/> /// when the object is plugged in. </remarks> protected Own(IOThread ioThread, Options options) : base(ioThread) { m_options = options; m_terminating = false; m_processedSeqnum = 0; m_owner = null; m_termAcks = 0; }
public PairSession(IOThread ioThread, bool connect, SocketBase socket, Options options, Address addr) : base(ioThread, connect, socket, options, addr) { }
/// <summary> /// Initializes a new instance of the <see cref="Own" /> class that is running within I/O thread. /// </summary> /// <param name="ioThread">The I/O thread.</param> /// <param name="options">The options.</param> /// <remarks> /// Note that the owner is unspecified in the constructor. It'll be assigned later on using <see cref="SetOwner"/> /// when the object is plugged in. /// </remarks> protected Own([NotNull] IOThread ioThread, [NotNull] Options options) : base(ioThread) { m_options = options; }