Methods Summary |
---|
protected abstract void | bind(int lport, java.net.InetAddress laddr)Binds a datagram socket to a local port and address.
|
protected abstract void | close()Close the socket.
|
protected void | connect(java.net.InetAddress address, int port)Connects a datagram socket to a remote destination. This associates the remote
address with the local socket so that datagrams may only be sent to this destination
and received from this destination. This may be overridden to call a native
system connect.
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.
|
protected abstract void | create()Creates a datagram socket.
|
protected void | disconnect()Disconnects a datagram socket from its remote destination.
|
protected java.io.FileDescriptor | getFileDescriptor()Gets the datagram socket file descriptor.
return fd;
|
protected int | getLocalPort()Gets the local port.
return localPort;
|
protected abstract byte | getTTL()Retrieve the TTL (time-to-live) option.
|
protected abstract int | getTimeToLive()Retrieve the TTL (time-to-live) option.
|
protected abstract void | join(java.net.InetAddress inetaddr)Join the multicast group.
|
protected abstract void | joinGroup(java.net.SocketAddress mcastaddr, java.net.NetworkInterface netIf)Join the multicast group.
|
protected abstract void | leave(java.net.InetAddress inetaddr)Leave the multicast group.
|
protected abstract void | leaveGroup(java.net.SocketAddress mcastaddr, java.net.NetworkInterface netIf)Leave the multicast group.
|
protected abstract int | peek(java.net.InetAddress i)Peek at the packet to see who it is from.
|
protected abstract int | peekData(java.net.DatagramPacket p)Peek at the packet to see who it is from. The data is returned,
but not consumed, so that a subsequent peekData/receive operation
will see the same data.
|
protected abstract void | receive(java.net.DatagramPacket p)Receive the datagram packet.
|
protected abstract void | send(java.net.DatagramPacket p)Sends a datagram packet. The packet contains the data and the
destination address to send the packet to.
|
protected abstract void | setTTL(byte ttl)Set the TTL (time-to-live) option.
|
protected abstract void | setTimeToLive(int ttl)Set the TTL (time-to-live) option.
|