#include <scim_socket.h>
Inheritance diagram for scim::Socket:
Public Member Functions | |
Socket (int id=-1) | |
~Socket () | |
bool | valid () const |
int | read (void *buf, size_t size) const |
int | read_with_timeout (void *buf, size_t size, int timeout) const |
int | write (const void *buf, size_t size) const |
int | wait_for_data (int timeout=-1) const |
int | get_error_number () const |
String | get_error_message () const |
int | get_id () const |
Protected Member Functions | |
bool | connect (const SocketAddress &addr) const |
bool | bind (const SocketAddress &addr) const |
bool | listen (int queue_length=5) const |
int | accept () const |
bool | create (SocketFamily family) |
void | close () |
This class cannot be created by user, it can only be created by class SocketClient and SocketServer.
Definition at line 146 of file scim_socket.h.
|
create a Socket object from an already created socket_id. |
|
destructor, call close. |
|
check if the socket is valid. |
|
read data from socket.
|
|
read data from socket with a timeout.
|
|
write data to socket.
|
|
wait for data is ready to read.
|
|
get the number of the last occurred error. Reimplemented in scim::SocketServer. |
|
get the message of the last occurred error. Reimplemented in scim::SocketServer. |
|
get the socket id. |
|
initiate a connection on a socket.
|
|
bind a socket to an address, used by SocketServer. |
|
listen for connections on a socket.
|
|
accept a connection on the socket, used by SocketServer.
|
|
create a socket for specific family. |
|
close the socket. Reimplemented in scim::SocketClient. |