MCPcopy Create free account
hub / github.com/apache/impala / SetTimeout

Method SetTimeout

be/src/kudu/util/net/socket.cc:580–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580Status Socket::SetTimeout(int opt, const char* optname, const MonoDelta& timeout) {
581 if (PREDICT_FALSE(timeout.ToNanoseconds() < 0)) {
582 return Status::InvalidArgument("Timeout specified as negative to SetTimeout",
583 timeout.ToString());
584 }
585 struct timeval tv;
586 timeout.ToTimeVal(&tv);
587 RETURN_NOT_OK_PREPEND(SetSockOpt(SOL_SOCKET, opt, tv),
588 Substitute("failed to set socket option $0 to $1",
589 optname, timeout.ToString()));
590 return Status::OK();
591}
592
593Status Socket::SetTcpKeepAlive(int idle_time_s, int retry_time_s, int num_retries) {
594#if defined(__linux__)

Callers

nothing calls this directly

Calls 7

InvalidArgumentFunction · 0.85
SetSockOptFunction · 0.85
SubstituteFunction · 0.85
OKFunction · 0.85
ToNanosecondsMethod · 0.80
ToTimeValMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected