|
scim 1.4.18
|
#include <scim_socket.h>
Public Member Functions | |
| SocketClient () | |
| Constructor. More... | |
| SocketClient (const SocketAddress &address) | |
| Constructor. More... | |
| ~SocketClient () | |
| Destructor. More... | |
| bool | is_connected () const |
| Check if the socket is connected. More... | |
| bool | connect (const SocketAddress &address) |
| Connect to a server. More... | |
| void | close () |
| Close the client. More... | |
Public Member Functions inherited from scim::Socket | |
| Socket (int id=-1) | |
| Create a Socket object from an already created socket_id. More... | |
| ~Socket () | |
| Destructor. More... | |
| bool | valid () const |
| Check if the socket is valid. More... | |
| int | read (void *buf, size_t size) const |
| Read data from socket. More... | |
| int | read_with_timeout (void *buf, size_t size, int timeout) const |
| read data from socket with a timeout. More... | |
| int | write (const void *buf, size_t size) const |
| Write data to socket. More... | |
| int | wait_for_data (int timeout=-1) const |
| Wait until there are some data ready to read. More... | |
| int | get_error_number () const |
| Get the number of the last occurred error. More... | |
| String | get_error_message () const |
| Get the message of the last occurred error. More... | |
| int | get_id () const |
| Get the socket id. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from scim::Socket | |
| bool | connect (const SocketAddress &addr) const |
| Initiate a connection on a socket. More... | |
| bool | bind (const SocketAddress &addr) const |
| Bind a socket to an address, used by SocketServer. More... | |
| bool | listen (int queue_length=5) const |
| Listen for connections on a socket. More... | |
| int | accept () const |
| Accept a connection on the socket, used by SocketServer. More... | |
| bool | create (SocketFamily family) |
| Create a socket for specific family. More... | |
| void | close () |
| Close the socket. More... | |
Socket client class.
Class SocketClient provides basic operations to create a Socket Client, such as connect, read, write, etc.
| scim::SocketClient::SocketClient | ( | ) |
Constructor.
| scim::SocketClient::SocketClient | ( | const SocketAddress & | address | ) |
Constructor.
| address | the server address to be connected. |
| scim::SocketClient::~SocketClient | ( | ) |
Destructor.
| bool scim::SocketClient::is_connected | ( | ) | const |
Check if the socket is connected.
| bool scim::SocketClient::connect | ( | const SocketAddress & | address | ) |
Connect to a server.
| address | the server socket address to be connected to. |
| void scim::SocketClient::close | ( | ) |
Close the client.