IXE::io::Socket Class Reference
This class implements client sockets (also called just "sockets").
More...
#include <Socket.h>
List of all members.
Public Member Functions |
|
| Socket () |
| | Creates an unconnected socket.
|
| | Socket (char const *host, int port) |
| | Creates a stream socket and connects it to the specified port number at the specified host.
|
|
| Socket (Socket const &other) |
| | Copy constructor.
|
| bool | connect (char const *host, int port) |
| | Connects this socket to the server.
|
| bool | open () |
| | Reconnects this socket to the server.
|
|
InetAddress | Address () |
| | Returns the address to which the socket is connected.
|
|
in_port_t | Port () |
| | Returns the remote port to which this socket is connected.
|
|
Socket & | operator= (const Socket &rhs) |
Protected Member Functions |
|
| Socket (SOCKET sock, InetAddress inetAddress, in_port_t port) |
Friends |
|
class | ServerSocket |
Detailed Description
This class implements client sockets (also called just "sockets").
A socket is an endpoint for communication between two machines.
Constructor & Destructor Documentation
| IXE::io::Socket::Socket |
( |
char const * |
host, |
|
|
int |
port | |
|
) |
| | |
Creates a stream socket and connects it to the specified port number at the specified host.
- Parameters:
-
| host | can be specified either as DNS hostname or as an IP address. If |
| host | is empty, connect to the local host. |
References connect().
Member Function Documentation
| bool IXE::io::Socket::connect |
( |
char const * |
host, |
|
|
int |
port | |
|
) |
| | |
Connects this socket to the server.
- Returns:
- true if successful.
References open().
Referenced by open(), and Socket().
| bool IXE::io::Socket::open |
( |
|
) |
|
Reconnects this socket to the server.
- Returns:
- true if successful.
References connect().
Referenced by connect().
The documentation for this class was generated from the following files:
- search/ixe/io/Socket.h
- search/ixe/io/Socket.cpp