Example #1
0
        public void Bind(IPAddress ipAddress, int port)
        {
            var binding = new Binding(ipAddress, port);

            SocketListener listener = _factory.CreateSocketListener(binding);

            _listeners[binding]       = listener;
            listener.IncomingChannel += PrepareChannel;
            listener.Start();
        }
Example #2
0
        public IPEndPoint Bind(IPAddress ipAddress, int port)
        {
            SocketListener listener = _factory.CreateSocketListener();

            listener.IncomingChannel += PrepareChannel;
            var binding = listener.Start(ipAddress, port);

            _listeners[binding] = listener;

            return(new IPEndPoint(binding.IpAddress, binding.Port));
        }