SocketImpl (Java SE 26 & JDK 26)
- 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_NODELAYstatic final intstatic final intThis option is used to both set and fetch the outgoing interface on which the multicast packets are sent.
static final intstatic final intstatic final intFetch the local address binding of a socket.
static final intstatic final intstatic final intstatic final intWhen this option is set, any TCP urgent data received on the socket will be received through the socket input stream.
static final intstatic final intstatic final intstatic final intstatic final intstatic final int -
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) Deprecated, for removal: This API element is subject to removal in a future version.
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.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
booleanIndicates whether some other object is "equal to" this one.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.intReturns a hash code value for this object.
final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
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
-