Uses of Class
java.net.SocketException
| Package | Description |
|---|---|
| com.squareup.okhttp.internal | |
| dalvik.system | |
| java.net | |
| libcore.io | |
| libcore.net | |
| org.apache.http.conn |
The client-side connection management and handling API
at the heart of what is referred to as HttpConn.
|
| org.conscrypt |
-
Uses of SocketException in com.squareup.okhttp.internal
Methods in com.squareup.okhttp.internal that throw SocketException Modifier and Type Method Description voidPlatform. tagSocket(Socket socket)voidPlatform. untagSocket(Socket socket) -
Uses of SocketException in dalvik.system
Methods in dalvik.system that throw SocketException Modifier and Type Method Description abstract voidSocketTagger. tag(FileDescriptor socketDescriptor)Notified whensocketDescriptoris either assigned to the current thread.voidSocketTagger. tag(Socket socket)abstract voidSocketTagger. untag(FileDescriptor socketDescriptor)Notified whensocketDescriptoris released from the current thread to a connection pool.voidSocketTagger. untag(Socket socket) -
Uses of SocketException in java.net
Subclasses of SocketException in java.net Modifier and Type Class Description classBindExceptionABindExceptionis thrown when a process cannot bind a local address/port, either because it is already bound or reserved by the OS.classConnectExceptionAConnectExceptionis thrown if a connection cannot be established to a remote host on a specific port.classNoRouteToHostExceptionTheNoRouteToHostExceptionwill be thrown while attempting to connect to a remote host but the host cannot be reached for instance because of a badly configured router or a blocking firewall.classPortUnreachableExceptionThisPortUnreachableExceptionwill be thrown if anICMP_Port_Unreachablemessage has been received.Methods in java.net that throw SocketException Modifier and Type Method Description voidDatagramSocket. bind(SocketAddress localAddr)Binds this socket to the local address and port specified bylocalAddr.protected abstract voidDatagramSocketImpl. bind(int port, InetAddress addr)Binds the datagram socket to the given localhost/port.voidPlainDatagramSocketImpl. bind(int port, InetAddress address)voidDatagramSocket. connect(SocketAddress peer)Connects this datagram socket to the address and port specified bypeer.protected voidDatagramSocketImpl. connect(InetAddress inetAddr, int port)Connects this socket to the specified remote address and port.voidPlainDatagramSocketImpl. connect(InetAddress inetAddr, int port)protected abstract voidDatagramSocketImpl. create()This method allocates the socket descriptor in the underlying operating system.voidPlainDatagramSocketImpl. create()booleanDatagramSocket. getBroadcast()Gets the state of the socket optionSocketOptions.SO_BROADCAST.static NetworkInterfaceNetworkInterface. getByIndex(int index)Returns the NetworkInterface corresponding to the given interface index, or null if no interface has this index.static NetworkInterfaceNetworkInterface. getByInetAddress(InetAddress address)Returns theNetworkInterfacecorresponding to the given address, or null if no interface has this address.static NetworkInterfaceNetworkInterface. getByName(String interfaceName)Returns theNetworkInterfacecorresponding to the named network interface, or null if no interface has this name.byte[]NetworkInterface. getHardwareAddress()Returns the hardware address of the interface, if it has one, or null otherwise.InetAddressMulticastSocket. getInterface()Returns an address of the outgoing network interface used by this socket.booleanSocket. getKeepAlive()Returns this socket'sSocketOptions.SO_KEEPALIVEsetting.booleanMulticastSocket. getLoopbackMode()Returns true if multicast loopback is disabled.intNetworkInterface. getMTU()Returns the Maximum Transmission Unit (MTU) of this interface.NetworkInterfaceMulticastSocket. getNetworkInterface()Returns the outgoing network interface used by this socket.static Enumeration<NetworkInterface>NetworkInterface. getNetworkInterfaces()Gets a list of all network interfaces available on the local system ornullif no interface is available.booleanSocket. getOOBInline()Returns this socket'sSocketOptions.SO_OOBINLINEsetting.ObjectPlainDatagramSocketImpl. getOption(int option)ObjectPlainSocketImpl. getOption(int option)ObjectSocketOptions. getOption(int optID)Gets the value for the specified socket option.intDatagramSocket. getReceiveBufferSize()Returns this socket'sreceive buffer size.intServerSocket. getReceiveBufferSize()Returns this socket'sreceive buffer size.intSocket. getReceiveBufferSize()Returns this socket'sreceive buffer size.booleanDatagramSocket. getReuseAddress()Gets the state of the socket optionSocketOptions.SO_REUSEADDR.booleanServerSocket. getReuseAddress()Gets the value of the socket optionSocketOptions.SO_REUSEADDR.booleanSocket. getReuseAddress()Returns this socket'sSocketOptions.SO_REUSEADDRsetting.intDatagramSocket. getSendBufferSize()Returns this socket'ssend buffer size.intSocket. getSendBufferSize()Returns this socket'ssend buffer size.intSocket. getSoLinger()Returns this socket'slingertimeout in seconds, or -1 for no linger (i.e.intDatagramSocket. getSoTimeout()Gets the socketreceive timeout.intSocket. getSoTimeout()Returns this socket'sreceive timeout.booleanSocket. getTcpNoDelay()Returns this socket'sSocketOptions#TCP_NODELAYsetting.intDatagramSocket. getTrafficClass()Returns this socket's {@see SocketOptions#IP_TOS} setting.intSocket. getTrafficClass()Returns this socket's {@see SocketOptions#IP_TOS} setting.booleanNetworkInterface. isLoopback()Returns true if this network interface is a loopback interface.booleanNetworkInterface. isPointToPoint()Returns true if this network interface is a point-to-point interface.booleanNetworkInterface. isUp()Returns true if this network interface is up.voidDatagramSocket. setBroadcast(boolean broadcast)Sets the socket optionSocketOptions.SO_BROADCAST.voidMulticastSocket. setInterface(InetAddress address)Sets the outgoing network interface used by this socket.voidSocket. setKeepAlive(boolean keepAlive)Sets this socket'sSocketOptions.SO_KEEPALIVEoption.voidMulticastSocket. setLoopbackMode(boolean disable)Disables multicast loopback ifdisable == true.voidDatagramSocket. setNetworkInterface(NetworkInterface netInterface)Sets the network interface used by this socket.voidMulticastSocket. setNetworkInterface(NetworkInterface networkInterface)Sets the outgoing network interface used by this socket to the givennetworkInterface.voidSocket. setOOBInline(boolean oobinline)Sets this socket'sSocketOptions.SO_OOBINLINEoption.voidPlainDatagramSocketImpl. setOption(int option, Object value)voidPlainSocketImpl. setOption(int option, Object value)voidSocketOptions. setOption(int optID, Object val)Sets the value of the specified socket option.voidDatagramSocket. setReceiveBufferSize(int size)Sets this socket'sreceive buffer size.voidServerSocket. setReceiveBufferSize(int size)Sets this socket'sreceive buffer size.voidSocket. setReceiveBufferSize(int size)Sets this socket'sreceive buffer size.voidDatagramSocket. setReuseAddress(boolean reuse)Sets the socket optionSocketOptions.SO_REUSEADDR.voidServerSocket. setReuseAddress(boolean reuse)Sets the value for the socket optionSocketOptions.SO_REUSEADDR.voidSocket. setReuseAddress(boolean reuse)Sets this socket'sSocketOptions.SO_REUSEADDRoption.voidDatagramSocket. setSendBufferSize(int size)Sets this socket'ssend buffer size.voidSocket. setSendBufferSize(int size)Sets this socket'ssend buffer size.voidSocket. setSoLinger(boolean on, int timeout)Sets this socket'slingertimeout in seconds.voidDatagramSocket. setSoTimeout(int timeout)Sets theread timeoutin milliseconds for this socket.voidServerSocket. setSoTimeout(int timeout)Sets theaccept timeoutin milliseconds for this socket.voidSocket. setSoTimeout(int timeout)Sets this socket'sread timeoutin milliseconds.voidSocket. setTcpNoDelay(boolean on)Sets this socket'sSocketOptions.TCP_NODELAYoption.voidDatagramSocket. setTrafficClass(int value)Sets the {@see SocketOptions#IP_TOS} value for every packet sent by this socket.voidSocket. setTrafficClass(int value)Sets this socket'sSocketOptions.IP_TOSvalue for every packet sent by this socket.booleanNetworkInterface. supportsMulticast()Returns true if this network interface supports multicast.Constructors in java.net that throw SocketException Constructor Description DatagramPacket(byte[] data, int offset, int length, SocketAddress sockAddr)Constructs a newDatagramPacketobject to send data to the addresssockAddr.DatagramPacket(byte[] data, int length, SocketAddress sockAddr)Constructs a newDatagramPacketobject to send data to the addresssockAddr.DatagramSocket()Constructs a UDP datagram socket which is bound to any available port on the localhost.DatagramSocket(int aPort)Constructs a UDP datagram socket which is bound to the specific portaPorton the localhost.DatagramSocket(int aPort, InetAddress addr)Constructs a UDP datagram socket which is bound to the specific local addressaddron portaPort.DatagramSocket(SocketAddress localAddr)Constructs a newDatagramSocketbound to the host/port specified by theSocketAddresslocalAddror an unboundDatagramSocketif theSocketAddressisnull.Socket(SocketImpl impl)Creates an unconnected socket with the given socket implementation. -
Uses of SocketException in libcore.io
Methods in libcore.io that return SocketException Modifier and Type Method Description SocketExceptionErrnoException. rethrowAsSocketException()Methods in libcore.io that throw SocketException Modifier and Type Method Description FileDescriptorBlockGuardOs. accept(FileDescriptor fd, InetSocketAddress peerAddress)FileDescriptorForwardingOs. accept(FileDescriptor fd, InetSocketAddress peerAddress)FileDescriptorOs. accept(FileDescriptor fd, InetSocketAddress peerAddress)FileDescriptorPosix. accept(FileDescriptor fd, InetSocketAddress peerAddress)voidForwardingOs. bind(FileDescriptor fd, InetAddress address, int port)static voidIoBridge. bind(FileDescriptor fd, InetAddress address, int port)voidOs. bind(FileDescriptor fd, InetAddress address, int port)voidPosix. bind(FileDescriptor fd, InetAddress address, int port)voidBlockGuardOs. connect(FileDescriptor fd, InetAddress address, int port)voidForwardingOs. connect(FileDescriptor fd, InetAddress address, int port)static booleanIoBridge. connect(FileDescriptor fd, InetAddress inetAddress, int port)Connects socket 'fd' to 'inetAddress' on 'port', with no timeout.static booleanIoBridge. connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs)Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'.voidOs. connect(FileDescriptor fd, InetAddress address, int port)voidPosix. connect(FileDescriptor fd, InetAddress address, int port)static InetAddressIoBridge. getSocketLocalAddress(FileDescriptor fd)static intIoBridge. getSocketLocalPort(FileDescriptor fd)static ObjectIoBridge. getSocketOption(FileDescriptor fd, int option)java.net has its own socket options similar to the underlying Unix ones.intBlockGuardOs. recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intBlockGuardOs. recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)intForwardingOs. recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intForwardingOs. recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)intOs. recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intOs. recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)intPosix. recvfrom(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetSocketAddress srcAddress)intPosix. recvfrom(FileDescriptor fd, ByteBuffer buffer, int flags, InetSocketAddress srcAddress)SocketExceptionErrnoException. rethrowAsSocketException()intBlockGuardOs. sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intBlockGuardOs. sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)intForwardingOs. sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intForwardingOs. sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)intOs. sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intOs. sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)intPosix. sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port)intPosix. sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port)static voidIoBridge. setSocketOption(FileDescriptor fd, int option, Object value)java.net has its own socket options similar to the underlying Unix ones.static FileDescriptorIoBridge. socket(boolean stream) -
Uses of SocketException in libcore.net
Constructors in libcore.net that throw SocketException Constructor Description RawSocket(String interfaceName, short protocolType)Creates a socket on the specified interface. -
Uses of SocketException in org.apache.http.conn
Subclasses of SocketException in org.apache.http.conn Modifier and Type Class Description classHttpHostConnectExceptionAConnectExceptionthat specifies theHttpHostthat was being connected to. -
Uses of SocketException in org.conscrypt
Methods in org.conscrypt that throw SocketException Modifier and Type Method Description booleanOpenSSLSocketImplWrapper. getKeepAlive()booleanSSLSocketWrapper. getKeepAlive()booleanOpenSSLSocketImplWrapper. getOOBInline()booleanSSLSocketWrapper. getOOBInline()intOpenSSLSocketImplWrapper. getReceiveBufferSize()intSSLSocketWrapper. getReceiveBufferSize()booleanOpenSSLSocketImplWrapper. getReuseAddress()booleanSSLSocketWrapper. getReuseAddress()intOpenSSLSocketImplWrapper. getSendBufferSize()intSSLSocketWrapper. getSendBufferSize()intOpenSSLSocketImplWrapper. getSoLinger()intSSLSocketWrapper. getSoLinger()intOpenSSLSocketImpl. getSoTimeout()intOpenSSLSocketImplWrapper. getSoTimeout()intSSLSocketWrapper. getSoTimeout()intOpenSSLSocketImpl. getSoWriteTimeout()Note write timeouts are not part of the javax.net.ssl.SSLSocket APIbooleanOpenSSLSocketImplWrapper. getTcpNoDelay()booleanSSLSocketWrapper. getTcpNoDelay()intOpenSSLSocketImplWrapper. getTrafficClass()intSSLSocketWrapper. getTrafficClass()voidOpenSSLSocketImpl. setHandshakeTimeout(int handshakeTimeoutMilliseconds)Set the handshake timeout on this socket.voidOpenSSLSocketImplWrapper. setKeepAlive(boolean on)voidSSLSocketWrapper. setKeepAlive(boolean on)voidOpenSSLSocketImpl. setOOBInline(boolean on)voidSSLSocketImpl. setOOBInline(boolean on)This method is not supported for SSLSocket implementation.voidOpenSSLSocketImplWrapper. setReceiveBufferSize(int size)voidSSLSocketWrapper. setReceiveBufferSize(int size)voidOpenSSLSocketImplWrapper. setReuseAddress(boolean on)voidSSLSocketWrapper. setReuseAddress(boolean on)voidOpenSSLSocketImplWrapper. setSendBufferSize(int size)voidSSLSocketWrapper. setSendBufferSize(int size)voidOpenSSLSocketImplWrapper. setSoLinger(boolean on, int linger)voidSSLSocketWrapper. setSoLinger(boolean on, int linger)voidOpenSSLSocketImpl. setSoTimeout(int readTimeoutMilliseconds)voidOpenSSLSocketImplWrapper. setSoTimeout(int to)voidSSLSocketWrapper. setSoTimeout(int to)voidOpenSSLSocketImpl. setSoWriteTimeout(int writeTimeoutMilliseconds)Note write timeouts are not part of the javax.net.ssl.SSLSocket APIvoidOpenSSLSocketImplWrapper. setTcpNoDelay(boolean on)voidSSLSocketWrapper. setTcpNoDelay(boolean on)voidOpenSSLSocketImplWrapper. setTrafficClass(int tos)voidSSLSocketWrapper. setTrafficClass(int tos)