MCPcopy Create free account
hub / github.com/acl-dev/acl / set_rw_timeout

Method set_rw_timeout

lib_acl_cpp/src/stream/stream.cpp:102–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102bool stream::set_rw_timeout(int n, bool use_sockopt /* false */)
103{
104 if (!stream_) {
105 return false;
106 }
107
108 if (!use_sockopt) {
109 stream_->rw_timeout = n;
110 return true;
111 }
112
113 stream_->rw_timeout = -1;
114
115 if (!set_sockopt_timeo(ACL_VSTREAM_SOCK(stream_), SO_RCVTIMEO, n)) {
116 return false;
117 }
118
119 return set_sockopt_timeo(ACL_VSTREAM_SOCK(stream_), SO_SNDTIMEO, n);
120}
121
122void stream::set_time_unit(time_unit_t unit) {
123 if (stream_) {

Callers 15

tcp_keeper.cppFile · 0.80
client_echoFunction · 0.80
fiber_mainFunction · 0.80
client_echoFunction · 0.80
mainFunction · 0.80
on_acceptMethod · 0.80
fiber_acceptFunction · 0.80
fiber_acceptFunction · 0.80
fiber_readerFunction · 0.80
fiber_readerFunction · 0.80
fiber_writerFunction · 0.80
fiber_readerFunction · 0.80

Calls 1

set_sockopt_timeoFunction · 0.85

Tested by 2

startMethod · 0.64
test_finishMethod · 0.64