X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_server.hxx;h=605613682d18a8ab893ff3782106539c8ec5e1d0;hp=8f1b84c3306d4b25c03c026a89fe26015418988c;hb=aa499d2034964a4c125794b7e8ea768cb7471411;hpb=0cf4dc9bf7fa527751fd7dc425f882fc86888132 diff --git a/src/socket_server.hxx b/src/socket_server.hxx index 8f1b84c..6056136 100644 --- a/src/socket_server.hxx +++ b/src/socket_server.hxx @@ -26,6 +26,9 @@ namespace libt2n { +/** + Socket based server class +*/ class socket_server : public server { public: @@ -50,22 +53,27 @@ class socket_server : public server { return socket_type; } void fill_buffer(long long usec_timeout=-1); + void fill_connection_buffers(); }; +/** + Socket based connection class +*/ class socket_connection : public connection { + friend class socket_server; + private: - int socket; + static const int recv_buffer_size=2048; + + int sock; - friend void socket_server::fill_buffer(long long usec_timeout); - socket_connection(int _socket, int _timeout); + socket_connection(int _sock, int _timeout); public: void close(); - - void fill_buffer(void); - + void fill_buffer(fd_set &cur_fdset); void write(const std::string& data); };