MultihomePlainSocketFactory.ConnectSocket Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to connects the socket to any of the InetAddresses the given host name resolves to.
[Android.Runtime.Register("connectSocket", "(Ljava/net/Socket;Ljava/lang/String;ILjava/net/InetAddress;ILorg/apache/http/params/HttpParams;)Ljava/net/Socket;", "")]
public Java.Net.Socket? ConnectSocket (Java.Net.Socket? sock, string? host, int port, Java.Net.InetAddress? localAddress, int localPort, Org.Apache.Http.Params.IHttpParams? params);
[<Android.Runtime.Register("connectSocket", "(Ljava/net/Socket;Ljava/lang/String;ILjava/net/InetAddress;ILorg/apache/http/params/HttpParams;)Ljava/net/Socket;", "")>]
abstract member ConnectSocket : Java.Net.Socket * string * int * Java.Net.InetAddress * int * Org.Apache.Http.Params.IHttpParams -> Java.Net.Socket
override this.ConnectSocket : Java.Net.Socket * string * int * Java.Net.InetAddress * int * Org.Apache.Http.Params.IHttpParams -> Java.Net.Socket
Parameters
- sock
- Socket
socket to connect to any of the given addresses
- host
- String
Host name to connect to
- port
- Int32
the port to connect to
- localAddress
- InetAddress
local address
- localPort
- Int32
local port
- params
- IHttpParams
HTTP parameters
Returns
Implements
- Attributes
Exceptions
if an error occurs during the connection
if timeout expires before connecting
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.