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

Method Init

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

Source from the content-addressed store, hash-verified

135#if defined(__linux__)
136
137Status Socket::Init(int family, int flags) {
138 int nonblocking_flag = (flags & FLAG_NONBLOCKING) ? SOCK_NONBLOCK : 0;
139 Reset(::socket(family, SOCK_STREAM | SOCK_CLOEXEC | nonblocking_flag, 0));
140 if (fd_ < 0) {
141 int err = errno;
142 return Status::NetworkError("error opening socket", ErrnoToString(err), err);
143 }
144
145 return Status::OK();
146}
147
148#else
149

Callers 4

BindAndListenMethod · 0.45
GetRandomPortFunction · 0.45
TEST_FFunction · 0.45

Calls 4

NetworkErrorFunction · 0.85
ErrnoToStringFunction · 0.85
OKFunction · 0.85
SetSockOptFunction · 0.85

Tested by 3

BindAndListenMethod · 0.36
TEST_FFunction · 0.36