Inheritance: IPSocket
Esempio n. 1
0
        private static TCPSocket /*!*/ BindLocalEndPoint(TCPSocket /*!*/ socket, MutableString localHost, int localPort)
        {
            IPAddress localIPAddress = localHost != null?GetHostAddress(localHost.ConvertToString()) : IPAddress.Loopback;

            IPEndPoint localEndPoint = new IPEndPoint(localIPAddress, localPort);

            socket.Socket.Bind(localEndPoint);
            return(socket);
        }
Esempio n. 2
0
 private static TCPSocket/*!*/ BindLocalEndPoint(TCPSocket/*!*/ socket, MutableString localHost, int localPort) {
     IPAddress localIPAddress = localHost != null ? GetHostAddress(localHost.ConvertToString()) : IPAddress.Loopback;
     IPEndPoint localEndPoint = new IPEndPoint(localIPAddress, localPort);
     socket.Socket.Bind(localEndPoint);
     return socket;
 }