|
bool | bind_and_listen (int port, int max_nr_pending_connections) |
| bind and listen to given port with a queue for pending connections of the given size
|
|
socket_ptr | wait_for_connection () |
| if no connection is pending, block thread and wait for next incoming connection
|
|
socket_ptr | check_for_connection () |
| check if a new connection is in the connection queue and return this or an empty connection pointer
|
|
std::string | get_last_error () const |
| returns the last error
|
|
bool | is_data_pending () const |
| return whether data has arrived
|
|
int | get_nr_of_arrived_bytes () const |
| return the number of data bytes that have been arrived at the socket or -1 if socket is not connected More...
|
|
std::string | receive_line () |
| receive data up to the next newline excluding the newline char
|
|
std::string | receive_data (unsigned int nr_of_bytes=0) |
| receive all pending data or if nr_of_bytes is larger than 0, exactly nr_of_bytes
|
|
bool | send_line (const std::string &content) |
| extends line by newline and send as data
|
|
bool | send_data (const std::string &) |
| send the data in the string
|
|
bool | close () |
| close the socket
|
|
int | get_ref_count () const |
| read access to current count
|
|
socket server allows to be connected to