public abstract class DatagramSocketImpl extends Object implements SocketOptions
Modifier and Type | Field and Description |
---|---|
protected FileDescriptor |
fd |
protected int |
localPort |
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_SNDBUF, SO_TIMEOUT, TCP_NODELAY
Constructor and Description |
---|
DatagramSocketImpl()
default constructor ...
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
bind(int lport,
InetAddress laddr)
Binds a datagram socket to a local port and address.
|
protected abstract void |
close()
Close the socket.
|
protected abstract void |
create()
Create a datagram socket
|
protected FileDescriptor |
getFileDescriptor()
Get the datagram socket file descriptor
|
protected int |
getLocalPort()
Get the local port.
|
protected abstract int |
getTimeToLive()
Retrieve the TTL (time-to-live) option.
|
protected abstract byte |
getTTL() |
protected abstract void |
join(InetAddress inetaddr)
Join the multicast group.
|
protected abstract void |
joinGroup(InetAddress inetaddr,
NetworkInterface nw)
Join the multicast group.
|
protected abstract void |
leave(InetAddress inetaddr)
Leave the multicast group.
|
protected abstract int |
peek(InetAddress i)
Peek at the packet to see who it is from.
|
protected abstract void |
receive(DatagramPacket p)
Receive the datagram packet.
|
protected abstract void |
send(DatagramPacket p)
Sends a datagram packet.
|
protected abstract void |
setTimeToLive(int ttl)
Set the TTL (time-to-live) option.
|
protected abstract void |
setTTL(byte ttl) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOption, setOption
protected int localPort
protected FileDescriptor fd
protected abstract void create() throws SocketException
SocketException
protected abstract void bind(int lport, InetAddress laddr) throws SocketException
SocketException
protected abstract void send(DatagramPacket p) throws IOException
IOException
protected abstract int peek(InetAddress i) throws IOException
IOException
protected abstract void receive(DatagramPacket p) throws IOException
IOException
protected abstract void setTTL(byte ttl) throws IOException
IOException
protected abstract byte getTTL() throws IOException
IOException
protected abstract void setTimeToLive(int ttl) throws IOException
IOException
protected abstract int getTimeToLive() throws IOException
IOException
protected abstract void join(InetAddress inetaddr) throws IOException
IOException
protected abstract void joinGroup(InetAddress inetaddr, NetworkInterface nw) throws IOException
IOException
protected abstract void leave(InetAddress inetaddr) throws IOException
IOException
protected abstract void close()
protected int getLocalPort()
protected FileDescriptor getFileDescriptor()