Ejemplo n.º 1
0
        void IConnector.Bind(IReactor dispatcher, IProtocolFactory factory, IPEndPoint localEP, int bufferSize)
        {
            _udpClient = new UdpClient(localEP);
            _udpClient.Client.ReceiveBufferSize = bufferSize;

            var protocol = factory.Create();

            var connection = new DatagramConnection(dispatcher, protocol, _udpClient);
            connection.Start(true);

            protocol.Bind(connection);
            protocol.Connected();
        }
Ejemplo n.º 2
0
        void IConnector.Bind(IReactor dispatcher, IProtocolFactory factory, IPEndPoint localEP, int bufferSize)
        {
            _udpClient = new UdpClient(localEP);
            _udpClient.Client.ReceiveBufferSize = bufferSize;

            var protocol = factory.Create();

            var connection = new DatagramConnection(dispatcher, protocol, _udpClient);

            connection.Start(true);

            protocol.Bind(connection);
            protocol.Connected();
        }