Deprecated
(4.3) use org.
| Modifier and Type | Method and Description |
|---|---|
| public Socket | Returns: the connected socket. The returned object may be different from thesock argument if this factory supports
a layered protocol.the socket to connect, as obtained from
sock, InetSocketAddress createSocket.
null indicates that a new socket
should be created and connected.the remote address to connect to. remoteAddress, InetSocketAddress the local address to bind the socket to, or
localAddress, HttpParams null for anyadditional params)parameters for connecting
Deprecated
as a consequence of
Connects a socket to the target host with the given remote address.
HttpParams being deprecated.
|
| public Socket | Returns: a new socketOptional params)parameters. In most cases these parameters
will not be required and will have no effect, as usually socket
initialization should take place in the
connectSocket(Socket, InetSocketAddress, InetSocketAddress, HttpParams)
method. However, in rare cases one may want to pass additional parameters
to this method in order to create a customized Socket instance,
for instance bound to a SOCKS proxy server.
Deprecated
as a consequence of
Creates a new, unconnected socket.
HttpParams being deprecated.
|
| public boolean |
| connectSocket | back to summary |
|---|---|
| public Socket connectSocket(Socket sock, InetSocketAddress remoteAddress, InetSocketAddress localAddress, HttpParams params) throws IOException, UnknownHostException, ConnectTimeoutException
Deprecated as a consequence of Connects a socket to the target host with the given remote address.
Please note that
| |
| createSocket | back to summary |
|---|---|
| public Socket createSocket(HttpParams params) throws IOException
Deprecated as a consequence of Creates a new, unconnected socket. The socket should subsequently be passed to
| |
| isSecure | back to summary |
|---|---|
| public boolean isSecure(Socket sock) throws IllegalArgumentException Checks whether a socket provides a secure connection. The socket must be
As a rule of thumb, plain sockets are not secure and TLS/SSL sockets are secure. However, there may be application specific deviations. For example, a plain socket to a host in the same intranet ("trusted zone") could be considered secure. On the other hand, a TLS/SSL socket could be considered insecure based on the cipher suite chosen for the connection.
| |