All Packages Class Hierarchy This Package Previous Next Index
Class java.net.DatagramSocketImpl
java.lang.Object
|
+----java.net.DatagramSocketImpl
- public class DatagramSocketImpl
- extends Object
- implements SocketOptions
Abstract datagram and multicast socket implementation base class.
-
fd
- The file descriptor object
-
localPort
-
-
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.
localPort
Properties Inheritable
localPort=int
fd
Properties Inheritable
fd=FileDescriptor
- The file descriptor object
DatagramSocketImpl
method DatagramSocketImpl() public
create
method create() Inheritable abstract Signals SocketException
- Creates a datagram socket
bind
method bind(lport=int, -
laddr=InetAddress) Inheritable abstract Signals SocketException
- Binds a datagram socket to a local port and address.
send
method send(p=DatagramPacket) Inheritable abstract Signals IOException
- Sends a datagram packet. The packet contains the data and the
destination address to send the packet to.
- Parameters:
- packet - to be sent.
peek
method peek(i=InetAddress) returns int Inheritable abstract Signals IOException
- Peek at the packet to see who it is from.
- Parameters:
- return - the address which the packet came from.
receive
method receive(p=DatagramPacket) Inheritable abstract Signals IOException
- Receive the datagram packet.
- Parameters:
- Packet - Received.
setTTL
method setTTL(ttl=byte) Inheritable abstract Signals IOException
- Set the TTL (time-to-live) option.
- Parameters:
- TTL - to be set.
getTTL
method getTTL() returns byte Inheritable abstract Signals IOException
- Retrieve the TTL (time-to-live) option.
join
method join(inetaddr=InetAddress) Inheritable abstract Signals IOException
- Join the multicast group.
- Parameters:
- multicast - address to join.
leave
method leave(inetaddr=InetAddress) Inheritable abstract Signals IOException
- Leave the multicast group.
- Parameters:
- multicast - address to leave.
close
method close() Inheritable abstract
- Close the socket.
getLocalPort
method getLocalPort() returns int Inheritable
- Get the local port.
getFileDescriptor
method getFileDescriptor() returns FileDescriptor Inheritable
- Get the datagram socket file descriptor
All Packages Class Hierarchy This Package Previous Next Index