X-Git-Url: http://developer.intra2net.com/git/?p=libt2n;a=blobdiff_plain;f=src%2Fsocket_handler.hxx;h=623f31c9495743eba3aad88af309afadf553133f;hp=b9aa175ddaaa9a7bf3e475cf999e10bd3229f247;hb=c7857475c8b0f02cac3ce29a617a4d542fa59f37;hpb=1450c0649dc1f1414fd8e051b8d452f4adcb4b24 diff --git a/src/socket_handler.hxx b/src/socket_handler.hxx index b9aa175..623f31c 100644 --- a/src/socket_handler.hxx +++ b/src/socket_handler.hxx @@ -34,15 +34,18 @@ class socket_handler private: static const unsigned int default_recv_buffer_size=2048; static const unsigned int default_write_block_size=4096; + static const long long default_write_timeout=30000000; socket_type_value socket_type; bool data_waiting(long long usec_timeout,long long *timeout_remaining=NULL); + void wait_ready_to_write(int socket, long long write_block_timeout); protected: int sock; unsigned int recv_buffer_size; unsigned int write_block_size; + long long write_timeout; socket_handler(int _sock, socket_type_value _socket_type); @@ -67,9 +70,11 @@ class socket_handler void set_recv_buffer_size(unsigned int new_recv_buffer_size); void set_write_block_size(unsigned int new_write_block_size); + void set_write_timeout(long long new_write_timeout); unsigned int get_recv_buffer_size() const { return recv_buffer_size; } unsigned int get_write_block_size() const { return write_block_size; } + long long get_write_timeout() const { return write_timeout; } }; }