Class java.net.DatagramSocketImpl
All Packages Class Hierarchy This Package Previous Next Index
Class java.net.DatagramSocketImpl
Object
|
+----java.net.DatagramSocketImpl
- public abstract class DatagramSocketImpl
- extends Object
- implements SocketOptions
Abstract datagram and multicast socket implementation base class.
- Author:
- Pavani Diwanji
- Since:
- JDK1.1
-
fd
- The file descriptor object
-
localPort
-
-
java.net.DatagramSocketImpl()
-
-
bind(int, InetAddress)
- Binds a datagram socket to a local port and address.
-
close()
- Close the socket.
-
create()
- Creates a datagram socket
-
getFileDescriptor()
- Get the datagram socket file descriptor
-
getLocalPort()
- Get the local port.
-
getOption(int)
- Fetch the value of an option.
-
getTTL()
- Retrieve the TTL (time-to-live) option.
-
join(InetAddress)
- Join the multicast group.
-
leave(InetAddress)
- Leave the multicast group.
-
peek(InetAddress)
- Peek at the packet to see who it is from.
-
receive(DatagramPacket)
- Receive the datagram packet.
-
send(DatagramPacket)
- Sends a datagram packet.
-
setOption(int, Object)
- Enable/disable the option specified by optID.
-
setTTL(byte)
- Set the TTL (time-to-live) option.
fd
protected java.io.FileDescriptor fd
- The file descriptor object
- Since:
JDK1.1
localPort
protected int localPort
DatagramSocketImpl
public DatagramSocketImpl()
bind
protected abstract void bind(int lport,
InetAddress laddr) throws SocketException
- Binds a datagram socket to a local port and address.
- Since:
- JDK1.1
close
protected abstract void close()
- Close the socket.
- Since:
- JDK1.1
create
protected abstract void create() throws SocketException
- Creates a datagram socket
- Since:
- JDK1.1
getFileDescriptor
protected java.io.FileDescriptor getFileDescriptor()
- Get the datagram socket file descriptor
- Since:
- JDK1.1
getLocalPort
protected int getLocalPort()
- Get the local port.
- Since:
- JDK1.1
getTTL
protected abstract byte getTTL() throws IOException
- Retrieve the TTL (time-to-live) option.
- Since:
- JDK1.1
join
protected abstract void join(InetAddress inetaddr) throws IOException
- Join the multicast group.
- Parameters:
- multicast - address to join.
- Since:
- JDK1.1
leave
protected abstract void leave(InetAddress inetaddr) throws IOException
- Leave the multicast group.
- Parameters:
- multicast - address to leave.
- Since:
- JDK1.1
peek
protected abstract int peek(InetAddress i) throws IOException
- Peek at the packet to see who it is from.
- Parameters:
- return - the address which the packet came from.
- Since:
- JDK1.1
receive
protected abstract void receive(DatagramPacket p) throws IOException
- Receive the datagram packet.
- Parameters:
- Packet - Received.
- Since:
- JDK1.1
send
protected abstract void send(DatagramPacket p) throws IOException
- Sends a datagram packet. The packet contains the data and the
destination address to send the packet to.
- Parameters:
- packet - to be sent.
- Since:
- JDK1.1
setTTL
protected abstract void setTTL(byte ttl) throws IOException
- Set the TTL (time-to-live) option.
- Parameters:
- TTL - to be set.
- Since:
- JDK1.1
All Packages Class Hierarchy This Package Previous Next Index