Method Summary |
|
abstract protected void | bind(int port, InetAddress addr) Bind the datagram socket to the nominated localhost/port. |
abstract protected void | close() Close the socket. |
protected void | connect(InetAddress inetAddr, int port) Connect the socket to the specified remote address and port. |
abstract protected void | create() This method allocates the socket descriptor in the underlying operating
system. |
protected void | disconnect() Disconnect the socket from the remote address and port. |
protected FileDescriptor | getFileDescriptor() Answer the FileDescriptor, which will be invalid if the socket is closed
or not bound. |
InetAddress | getLocalAddress() Answer the local address to which the socket is bound. |
protected int | getLocalPort() Answer the local port. |
abstract public Object | getOption(int optID) Answer the nominated socket option. |
abstract protected byte | getTTL() Answer the time-to-live (TTL) for multicast packets sent on this socket. |
abstract protected int | getTimeToLive() Answer the time-to-live (TTL) for multicast packets sent on this socket. |
abstract protected void | join(InetAddress addr) Add this socket to the multicast group. |
abstract protected void | joinGroup(SocketAddress addr, NetworkInterface netInterface) Add this socket to the multicast group. |
abstract protected void | leave(InetAddress addr) Remove the socket from the multicast group. |
abstract protected void | leaveGroup(SocketAddress addr, NetworkInterface netInterface) Remove the socket from the multicast group. |
abstract protected int | peek(InetAddress sender) Peek at the incoming packet to this socket and answer the sender's
address into sender . |
abstract protected int | peekData(DatagramPacket pack) Receive data into the supplied datagram packet by peeking. |
abstract protected void | receive(DatagramPacket pack) Receive data into the supplied datagram packet. |
abstract protected void | send(DatagramPacket pack) Sends the supplied datagram packet. |
abstract public void | setOption(int optID, Object val) Set the nominated socket option. |
abstract protected void | setTTL(byte ttl) Set the time-to-live (TTL) for multicast packets sent on this socket. |
abstract protected void | setTimeToLive(int ttl) Set the time-to-live (TTL) for multicast packets sent on this socket. |