A PgmSocket utilizes the Pragmatic General Multicast (PGM) multicast protocol, which is also referred to as "reliable multicast". This is only supported on Windows when Microsoft Message Queueing (MSMQ) is installed. See RFC 3208.
Inheritance: IDisposable
コード例 #1
0
        private void Accept()
        {
            m_acceptedSocket = new PgmSocket(m_options, PgmSocketType.Receiver, m_address);
            m_acceptedSocket.Init();

            m_handle.Accept(m_acceptedSocket.Handle);
        }
コード例 #2
0
        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;
        }
コード例 #3
0
ファイル: PgmSession.cs プロジェクト: awb99/netmq
        public PgmSession( PgmSocket pgmSocket,  Options options)
        {
            m_handle = pgmSocket.Handle;
            m_options = options;
            m_data = new byte[Config.PgmMaxTPDU];
            m_joined = false;

            m_state = State.Idle;
        }
コード例 #4
0
        private void Accept()
        {
            m_acceptedSocket = new PgmSocket(m_options, PgmSocketType.Receiver, m_address);
            m_acceptedSocket.Init();

#pragma warning disable 618
            // TODO: we must upgrade to GetAcceptedSocket, need to be tested on Windows with MSMQ installed
            m_handle.Accept(m_acceptedSocket.Handle);
#pragma warning restore 618
        }
コード例 #5
0
ファイル: PgmSender.cs プロジェクト: r618/netmq
        public void Init([NotNull] PgmAddress pgmAddress)
        {
            m_pgmAddress = pgmAddress;

            m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, (PgmAddress)m_addr.Resolved);
            m_pgmSocket.Init();

            m_socket = m_pgmSocket.Handle;

            var localEndpoint = new IPEndPoint(IPAddress.Any, 0);

            m_socket.Bind(localEndpoint);

            m_pgmSocket.InitOptions();

            m_outBufferSize = m_options.PgmMaxTransportServiceDataUnitLength;
            m_outBuffer     = new ByteArraySegment(new byte[m_outBufferSize]);
        }
コード例 #6
0
ファイル: PgmSender.cs プロジェクト: newstrading/netmq
        public void Init(PgmAddress pgmAddress)
        {
            m_pgmAddress = pgmAddress;

            m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, (PgmAddress)m_addr.Resolved);
            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]);
        }
コード例 #7
0
ファイル: PgmSender.cs プロジェクト: awb99/netmq
        public void Init( PgmAddress pgmAddress)
        {
            m_pgmAddress = pgmAddress;

            m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, (PgmAddress)m_addr.Resolved);
            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]);
        }
コード例 #8
0
        /// <exception cref="InvalidException">Unable to parse the address's port number, or the IP address could not be parsed.</exception>
        /// <exception cref="NetMQException">Error establishing underlying socket.</exception>
        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);
        }
コード例 #9
0
ファイル: PgmListener.cs プロジェクト: awb99/netmq
        /// <exception cref="InvalidException">Unable to parse the address's port number, or the IP address could not be parsed.</exception>
        /// <exception cref="NetMQException">Error establishing underlying socket.</exception>
        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);
        }
コード例 #10
0
ファイル: PgmSender.cs プロジェクト: somdoron/netmq
        public void Init([NotNull] PgmAddress pgmAddress)
        {
            m_pgmAddress = pgmAddress;

            m_pgmSocket = new PgmSocket(m_options, PgmSocketType.Publisher, (PgmAddress)m_addr.Resolved);
            m_pgmSocket.Init();

            m_socket = m_pgmSocket.Handle;

            var localEndpoint = new IPEndPoint(IPAddress.Any, 0);

            m_socket.Bind(localEndpoint);

            m_pgmSocket.InitOptions();

            m_outBufferSize = m_options.PgmMaxTransportServiceDataUnitLength;
            m_outBuffer = new ByteArraySegment(new byte[m_outBufferSize]);
        }
コード例 #11
0
ファイル: PgmListener.cs プロジェクト: awb99/netmq
        private void Accept()
        {
            m_acceptedSocket = new PgmSocket(m_options, PgmSocketType.Receiver, m_address);
            m_acceptedSocket.Init();

            m_handle.Accept(m_acceptedSocket.Handle);
        }