private void Accept() { m_acceptedSocket = new PgmSocket(m_options, PgmSocketType.Receiver, m_address); m_acceptedSocket.Init(); m_handle.Accept(m_acceptedSocket.Handle); }
public PgmSession([NotNull] PgmSocket pgmSocket, [NotNull] Options options) { m_handle = pgmSocket.Handle; m_options = options; m_data = new byte[Config.PgmMaxTPDU]; m_joined = false; m_state = State.Idle; }
public PgmSession(PgmSocket pgmSocket, Options options) { m_handle = pgmSocket.Handle; m_pgmSocket = pgmSocket; m_options = options; data = new byte[Config.PgmMaxTPDU]; m_joined = false; m_state = State.Idle; }
public void Init([NotNull] PgmAddress pgmAddress) { m_pgmAddress = pgmAddress; m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, m_addr.Resolved as PgmAddress); m_pgmSocket.Init(); m_socket = m_pgmSocket.Handle; var localEndpoint = new IPEndPoint(IPAddress.Any, 0); m_socket.Bind(localEndpoint); m_pgmSocket.InitOptions(); m_outBufferSize = Config.PgmMaxTPDU; m_outBuffer = new ByteArraySegment(new byte[m_outBufferSize]); }
public void Init(string network) { m_address = new PgmAddress(network); m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Listener, m_address); m_pgmSocket.Init(); m_handle = m_pgmSocket.Handle; try { m_handle.Bind(m_address.Address); m_pgmSocket.InitOptions(); m_handle.Listen(m_options.Backlog); } catch (SocketException ex) { Close(); throw NetMQException.Create(ex); } m_socket.EventListening(m_address.ToString(), m_handle); }
public void Init([NotNull] string network) { m_address = new PgmAddress(network); m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Listener, m_address); m_pgmSocket.Init(); m_handle = m_pgmSocket.Handle; try { m_handle.Bind(m_address.Address); m_pgmSocket.InitOptions(); m_handle.Listen(m_options.Backlog); } catch (SocketException ex) { Close(); throw NetMQException.Create(ex); } m_socket.EventListening(m_address.ToString(), m_handle); }
public void Init([NotNull] PgmAddress pgmAddress) { m_pgmAddress = pgmAddress; m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, m_addr.Resolved as PgmAddress); m_pgmSocket.Init(); m_socket = m_pgmSocket.Handle; var localEndpoint = new IPEndPoint(IPAddress.Any, 0); m_socket.Bind(localEndpoint); m_pgmSocket.InitOptions(); m_outBufferSize = Config.PgmMaxTPDU; m_outBuffer = new ByteArraySegment(new byte[m_outBufferSize]); }
private void Accept() { m_acceptedSocket = new PgmSocket(m_options, PgmSocketType.Receiver, m_address); m_acceptedSocket.Init(); m_handle.Accept(m_acceptedSocket.Handle); }