|
|
Socket Class ReferenceInheritance diagram for Socket:
[legend]Collaboration diagram for Socket:
[legend]List of all members.
Detailed Description
This class implements client sockets (also called just "sockets"). A socket is an endpoint for communication between two machines.
The actual work of the socket is performed by an instance of the SocketImpl class. An application, by changing the socket factory that creates the socket implementation, can configure itself to create sockets appropriate to the local firewall.
Constructor & Destructor Documentation
|
Creates an unconnected socket. |
Socket |
( |
InetAddress |
address, |
|
|
int |
port |
|
) |
|
|
|
Creates a stream socket and connects it to the specified port number at the specified IP address. |
Socket |
( |
InetAddress |
address, |
|
|
int |
port, |
|
|
InetAddress |
localAddr, |
|
|
int |
localPort |
|
) |
|
|
|
Creates a socket and connects it to the specified remote address on the specified remote port. |
Socket |
( |
const String & |
host, |
|
|
int |
port |
|
) |
|
|
|
Creates a stream socket and connects it to the specified port number on the named host. |
Socket |
( |
const String & |
host, |
|
|
int |
port, |
|
|
InetAddress |
localAddr, |
|
|
int |
localPort |
|
) |
|
|
|
Creates a socket and connects it to the specified remote host on the specified remote port. |
Member Function Documentation
InetAddress getInetAddress |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's address field. |
|
Returns an input stream for this socket. |
int getLocalPort |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's localport field. |
|
Returns an output stream for this socket. |
int getPort |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's port field. |
The documentation for this class was generated from the following files:
|
|
Copyright © 1999-2004, Apache Software Foundation
|