SocketImpl (Java SE 25 & JDK 25)
- All Implemented Interfaces:
SocketOptions
-
Field Summary
Fields
The IP address of the remote end of this socket.
The file descriptor object for this socket.
protected intThe local port number to which this socket is connected.
protected intThe port number on the remote host to which this socket is connected.
Fields declared in interface SocketOptions
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_REUSEPORT, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY -
Constructor Summary
Constructors
Initialize a new instance of this class
-
Method Summary
protected abstract voidprotected abstract intReturns the number of bytes that can be read from this socket without blocking.
protected abstract voidBinds this socket to the specified local IP address and port number.
protected abstract voidclose()protected abstract voidConnects this socket to the specified port on the named host.
protected abstract voidConnects this socket to the specified port number on the specified host.
protected abstract voidConnects this socket to the specified port number on the specified host.
protected abstract voidcreate(boolean stream) Returns the value of this socket's
fdfield.Returns the value of this socket's
addressfield.Returns an input stream for this socket.
protected intReturns the value of this socket's
localportfield.protected <T> TCalled to get a socket option.
Returns an output stream for this socket.
protected intgetPort()Returns the value of this socket's
portfield.protected abstract voidlisten(int backlog) Sets the maximum queue length for incoming connection indications (a request to connect) to the
countargument.protected abstract voidsendUrgentData(int data) Send one byte of urgent data on the socket.
protected <T> voidCalled to set a socket option.
protected voidsetPerformancePreferences(int connectionTime, int latency, int bandwidth) Sets performance preferences for this socket.
protected voidPlaces the input stream for this socket at "end of stream".
protected voidDisables the output stream for this socket.
Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket)
protected booleanReturns whether or not this SocketImpl supports sending urgent data.
toString()Returns the address and port of this socket as a
String.
-
Field Details
-
fd
-
address
-
port
-
localport
-
-
Constructor Details
-
SocketImpl
-
-
Method Details
-
create
-
connect
-
connect
-
connect
-
bind
-
listen
-
accept
-
getInputStream
-
getOutputStream
-
available
-
close
-
shutdownInput
-
shutdownOutput
-
getFileDescriptor
-
getInetAddress
-
getPort
-
supportsUrgentData
-
sendUrgentData
-
getLocalPort
-
toString
-
setPerformancePreferences
-
setOption
-
getOption
-
supportedOptions
-