Added in API level 1
Deprecated in API level 22

LayeredSocketFactory

interface LayeredSocketFactory : SocketFactory
org.apache.http.conn.scheme.LayeredSocketFactory

A SocketFactory for layered sockets (SSL/TLS). See there for things to consider when implementing a socket factory.

Summary

Public methods
abstract Socket!
createSocket(socket: Socket!, host: String!, port: Int, autoClose: Boolean)

Returns a socket connected to the given host that is layered over an existing socket.

Inherited functions

Public methods

createSocket

Added in API level 1
abstract fun createSocket(
    socket: Socket!,
    host: String!,
    port: Int,
    autoClose: Boolean
): Socket!

Deprecated: Deprecated in Java.

Returns a socket connected to the given host that is layered over an existing socket. Used primarily for creating secure sockets through proxies.

Parameters
socket Socket!: the existing socket
host String!: the host name/IP
port Int: the port on the host
autoClose Boolean: a flag for closing the underling socket when the created socket is closed
Return
Socket! Socket a new socket
Exceptions
java.io.IOException if an I/O error occurs while creating the socket
java.net.UnknownHostException if the IP address of the host cannot be determined