|
|
DatagramSocket Class ReferenceInheritance diagram for DatagramSocket:
[legend]Collaboration diagram for DatagramSocket:
[legend]List of all members.
Detailed Description
This class represents a socket for sending and receiving datagram packets.
Constructor & Destructor Documentation
|
Constructs a datagram socket and binds it to any available port on the local host machine. |
|
Constructs a datagram socket and binds it to the specified port on the local host machine. |
|
Creates a datagram socket, bound to the specified local address. |
|
ensure the socket is closed. |
Member Function Documentation
void bind |
( |
int |
lport, |
|
|
InetAddress |
laddress |
|
) |
|
|
|
Binds a datagram socket to a local port and address. |
|
Closes this datagram socket |
void connect |
( |
InetAddress |
address, |
|
|
int |
port |
|
) |
|
|
|
Connects the socket to a remote address for this socket. |
|
Creates a datagram socket. |
InetAddress getInetAddress |
( |
|
) |
const [inline] |
|
|
Returns the address to which this socket is connected. |
InetAddress getLocalAddress |
( |
|
) |
const [inline] |
|
|
Gets the local address to which the socket is bound. |
int getLocalPort |
( |
|
) |
const [inline] |
|
|
Returns the port number on the local host to which this socket is bound. |
int getPort |
( |
|
) |
const [inline] |
|
|
Returns the port for this socket |
bool isBound |
( |
|
) |
const [inline] |
|
|
Returns the binding state of the socket. * |
bool isClosed |
( |
|
) |
const [inline] |
|
|
Returns wether the socket is closed or not. |
bool isConnected |
( |
|
) |
const [inline] |
|
|
Returns the connection state of the socket. |
|
Receives a datagram packet from this socket. |
|
Sends a datagram packet from this socket. |
Member Data Documentation
|
The file descriptor object for this socket. |
|
The local port number to which this socket is connected. |
The documentation for this class was generated from the following files:
- datagramsocket.h
- datagramsocket.cpp
|
|
Copyright © 1999-2004, Apache Software Foundation
|