Inheritance diagram for Socket:
Public Member Functions | |
Socket (InetAddress address, int port) | |
Socket (InetAddress address, int port, InetAddress localAddr, int localPort) | |
Socket (const String &host, int port) | |
Socket (const String &host, int port, InetAddress localAddr, int localPort) | |
void | close () |
InetAddress | getInetAddress () const |
int | getLocalPort () const |
int | getPort () const |
SocketOutputStreamPtr | getOutputStream () |
SocketInputStreamPtr | getInputStream () |
Protected Member Functions | |
Socket () | |
Socket (SocketImplPtr impl) |
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.
Socket | ( | ) | [protected] |
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 | ( | SocketImplPtr | impl | ) | [protected] |
Creates an unconnected Socket with a user-specified SocketImpl.
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.
void close | ( | ) | [inline] |
Closes this socket.
InetAddress getInetAddress | ( | ) | const [inline] |
Returns the value of this socket's address field.
SocketInputStreamPtr getInputStream | ( | ) |
Returns an input stream for this socket.
int getLocalPort | ( | ) | const [inline] |
Returns the value of this socket's localport field.
SocketOutputStreamPtr getOutputStream | ( | ) |
Returns an output stream for this socket.
int getPort | ( | ) | const [inline] |
Returns the value of this socket's port field.