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.


Variable Index

 o fd
The file descriptor object
 o localPort

Constructor Index

 o DatagramSocketImpl()

Method Index

 o bind(int, InetAddress)
Binds a datagram socket to a local port and address.
 o close()
Close the socket.
 o create()
Creates a datagram socket
 o getFileDescriptor()
Get the datagram socket file descriptor
 o getLocalPort()
Get the local port.
 o getOption(int)
Fetch the value of an option.
 o getTTL()
Retrieve the TTL (time-to-live) option.
 o join(InetAddress)
Join the multicast group.
 o leave(InetAddress)
Leave the multicast group.
 o peek(InetAddress)
Peek at the packet to see who it is from.
 o receive(DatagramPacket)
Receive the datagram packet.
 o send(DatagramPacket)
Sends a datagram packet.
 o setOption(int, Object)
Enable/disable the option specified by optID.
 o setTTL(byte)
Set the TTL (time-to-live) option.

Variables

 o localPort
Properties Inheritable 
   localPort=int 
 o fd
Properties Inheritable 
    fd=FileDescriptor 
The file descriptor object

Constructors

 o DatagramSocketImpl
    method DatagramSocketImpl() public 

Methods

 o create
    method create()  Inheritable abstract    Signals SocketException
Creates a datagram socket

 o bind
    method bind(lport=int, -
                laddr=InetAddress)  Inheritable abstract    Signals SocketException
Binds a datagram socket to a local port and address.

 o 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.
 o 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.
 o receive
    method receive(p=DatagramPacket)  Inheritable abstract    Signals IOException
Receive the datagram packet.

Parameters:
Packet - Received.
 o setTTL
    method setTTL(ttl=byte)  Inheritable abstract    Signals IOException
Set the TTL (time-to-live) option.

Parameters:
TTL - to be set.
 o getTTL
    method getTTL() returns byte Inheritable abstract    Signals IOException
Retrieve the TTL (time-to-live) option.

 o join
    method join(inetaddr=InetAddress)  Inheritable abstract    Signals IOException
Join the multicast group.

Parameters:
multicast - address to join.
 o leave
    method leave(inetaddr=InetAddress)  Inheritable abstract    Signals IOException
Leave the multicast group.

Parameters:
multicast - address to leave.
 o close
    method close()  Inheritable abstract    
Close the socket.

 o getLocalPort
    method getLocalPort() returns int Inheritable     
Get the local port.

 o getFileDescriptor
    method getFileDescriptor() returns FileDescriptor Inheritable     
Get the datagram socket file descriptor


All Packages  Class Hierarchy  This Package  Previous  Next  Index