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

Function SetSockOpt

be/src/rpc/thrift-util.cc:210–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208
209template<typename T>
210Status SetSockOpt(THRIFT_SOCKET socket, int level, int option,
211 string option_string, const T& value) {
212 if (::setsockopt(socket, level, option, &value, sizeof(T)) == -1) {
213 int err = errno;
214 return Status(Substitute("Failed to set $0 to $1: $2", option_string,
215 value, GetStrErrMsg(err)));
216 }
217 return Status::OK();
218}
219
220Status SetKeepAliveOptionsForSocket(THRIFT_SOCKET socket, int32_t probe_period_s,
221 int32_t retry_period_s, int32_t retry_count) {

Callers 8

InitMethod · 0.85
SetNoDelayMethod · 0.85
SetTcpCorkMethod · 0.85
SetReuseAddrMethod · 0.85
SetReusePortMethod · 0.85
SetTimeoutMethod · 0.85
SetTcpKeepAliveMethod · 0.85

Calls 4

SubstituteFunction · 0.85
GetStrErrMsgFunction · 0.85
OKFunction · 0.85
StatusClass · 0.50

Tested by

no test coverage detected