DatagramSocketImpl (Java SE 26 & JDK 26)
- All Implemented Interfaces:
SocketOptions
-
Field Summary
Fields
The file descriptor object.
protected intFields 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
Constructor for subclasses to call.
-
Method Summary
protected abstract voidBinds a datagram socket to a local port and address.
protected abstract voidclose()protected voidConnects a datagram socket to a remote destination.
protected abstract voidcreate()Creates a datagram socket.
protected voidDisconnects a datagram socket from its remote destination.
Gets the datagram socket file descriptor.
protected intprotected <T> TCalled to get a socket option.
protected abstract intRetrieve the TTL (time-to-live) option.
protected abstract voidJoin the multicast group.
protected abstract voidJoin the multicast group.
protected abstract voidLeave the multicast group.
protected abstract voidLeave the multicast group.
protected abstract intPeek at the packet to see who it is from.
protected abstract intPeek at the packet to see who it is from.
protected abstract voidReceive the datagram packet.
protected abstract voidprotected <T> voidCalled to set a socket option.
protected abstract voidsetTimeToLive(int ttl) Set the TTL (time-to-live) option.
Returns a set of SocketOptions supported by this impl and by this impl's socket (DatagramSocket or MulticastSocket)
Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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.
Returns a string representation of the object.
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
-
localPort
-
fd
-
-
Constructor Details
-
DatagramSocketImpl
-
-
Method Details
-
create
-
bind
-
send
-
connect
-
disconnect
-
peek
-
peekData
-
receive
-
setTimeToLive
-
getTimeToLive
-
join
-
leave
-
joinGroup
-
leaveGroup
-
close
-
getLocalPort
-
getFileDescriptor
-
setOption
-
getOption
-
supportedOptions
-