BytesRoad.Net.Sockets.SocketEx.Bind C# (CSharp) Метод

Bind() публичный Метод

Associates a BytesRoad.Net.Sockets.SocketEx with local end point at the proxy server.
The behavior of the Bind method depends on the proxy type specified while instance of the SocketEx class constructed. Table below represents the behavior of the method for different types of proxy server. Type of proxy server Behavior of the Bind method BytesRoad.Net.Sockets.ProxyType.None The socket will be bound locally to the same IP address as the instance of the SocketEx class specified by socket parameter. BytesRoad.Net.Sockets.ProxyType.HttpConnect Web proxy not support binding command. The System.InvalidOperationException would be thrown. BytesRoad.Net.Sockets.ProxyType.Socks4

-or-

BytesRoad.Net.Sockets.ProxyType.Socks4a

-or-

BytesRoad.Net.Sockets.ProxyType.Socks5
The socket will be bound at the proxy server. Port and IP address may be retrieved via BytesRoad.Net.Sockets.SocketEx.LocalEndPoint property. An instance specified by socket parameter must be connected with the remote host through physically the same proxy server as the instance of the SocketEx class on which Bind method are called.
/// The object was disposed. /// /// The operation is unsupported. /// /// An error occurred when attempting to access /// the socket which is used to complete the requested operation. ///
public Bind ( SocketEx socket ) : void
socket SocketEx /// An instance of the /// class which already connected to the remote host through the proxy /// server. See remarks for more details. ///
Результат void
        public void Bind(SocketEx socket)
        {
            DoTimeoutOp(_connectTimeout, new Bind_Op(_baseSocket, socket));
        }