|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.DatagramSocketImpl
Untamed:
Field Summary | |
protected FileDescriptor |
fd
The file descriptor object. |
protected int |
localPort
The local port number. |
Fields inherited from interface java.net.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_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
Constructor Summary | |
DatagramSocketImpl()
Enabled: |
Method Summary | |
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 void |
connect(InetAddress address,
int port)
Connects a datagram socket to a remote destination. |
protected abstract void |
create()
Creates a datagram socket. |
protected void |
disconnect()
Disconnects a datagram socket from its remote destination. |
protected FileDescriptor |
getFileDescriptor()
Gets the datagram socket file descriptor. |
protected int |
getLocalPort()
Gets the local port. |
protected abstract int |
getTimeToLive()
Retrieve the TTL (time-to-live) option. |
protected abstract byte |
getTTL()
Deprecated. use getTimeToLive instead. |
protected abstract void |
join(InetAddress inetaddr)
Join the multicast group. |
protected abstract void |
joinGroup(SocketAddress mcastaddr,
NetworkInterface netIf)
Join the multicast group. |
protected abstract void |
leave(InetAddress inetaddr)
Leave the multicast group. |
protected abstract void |
leaveGroup(SocketAddress mcastaddr,
NetworkInterface netIf)
Leave the multicast group. |
protected abstract int |
peek(InetAddress i)
Peek at the packet to see who it is from. |
protected abstract int |
peekData(DatagramPacket p)
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)
Deprecated. use setTimeToLive instead. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.net.SocketOptions |
getOption, setOption |
Field Detail |
protected int localPort
protected FileDescriptor fd
Constructor Detail |
public DatagramSocketImpl()
Method Detail |
protected abstract void create() throws SocketException
SocketException
protected abstract void bind(int lport, InetAddress laddr) throws SocketException
lport
- the local portladdr
- the local address
SocketException
protected abstract void send(DatagramPacket p) throws IOException
p
- the packet to be sent.
IOException
protected void connect(InetAddress address, int port) throws SocketException
If the remote destination to which the socket is connected does not exist, or is otherwise unreachable, and if an ICMP destination unreachable packet has been received for that address, then a subsequent call to send or receive may throw a PortUnreachableException. Note, there is no guarantee that the exception will be thrown.
address
- the remote InetAddress to connect toport
- the remote port number
SocketException
protected void disconnect()
protected abstract int peek(InetAddress i) throws IOException
i
- an InetAddress object
IOException
protected abstract int peekData(DatagramPacket p) throws IOException
p
- the Packet Received.
IOException
protected abstract void receive(DatagramPacket p) throws IOException
p
- the Packet Received.
IOException
protected abstract void setTTL(byte ttl) throws IOException
ttl
- a byte specifying the TTL value
IOException
getTTL()
protected abstract byte getTTL() throws IOException
IOException
setTTL(byte)
protected abstract void setTimeToLive(int ttl) throws IOException
ttl
- an int specifying the time-to-live value
IOException
getTimeToLive()
protected abstract int getTimeToLive() throws IOException
IOException
setTimeToLive(int)
protected abstract void join(InetAddress inetaddr) throws IOException
inetaddr
- multicast address to join.
IOException
protected abstract void leave(InetAddress inetaddr) throws IOException
inetaddr
- multicast address to leave.
IOException
protected abstract void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException
mcastaddr
- address to join.netIf
- specifies the local interface to receive multicast
datagram packets
IOException
- if an I/O exception occurs while joining
the multicast groupprotected abstract void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf) throws IOException
mcastaddr
- address to leave.netIf
- specified the local interface to leave the group at
IOException
- if an I/O exception occurs while leaving
the multicast groupprotected abstract void close()
protected int getLocalPort()
protected FileDescriptor getFileDescriptor()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |