4 #include <cgv/data/ref_ptr.h>
15 static bool show_debug_output;
16 static int nr_of_sockets;
20 friend class socket_select;
30 bool set_last_error(
const char* location,
const std::string& text =
"")
const;
33 static void enable_debug_output(
bool enable =
true);
37 std::string get_last_error()
const;
39 bool is_data_pending()
const;
41 int get_nr_of_arrived_bytes()
const;
43 std::string receive_line();
45 std::string receive_data(
unsigned int nr_of_bytes = 0);
47 bool send_line(
const std::string& content);
49 bool send_data(
const std::string&);
71 bool connect(
const std::string& host,
int port);
92 bool bind_and_listen(
int port,
int max_nr_pending_connections);
111 #include <cgv/config/lib_end.h>