MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / fstack_socket

Function fstack_socket

io/fstack-dpdk.cpp:235–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235int fstack_socket(int domain, int type, int protocol) {
236 int fd = ff_socket(domain, type, protocol);
237 if (fd < 0)
238 return fd;
239 int val = 1;
240 if (ff_ioctl(fd, FIONBIO, &val) < 0)
241 LOG_WARN("failed to set socket non-blocking");
242 if (ff_ioctl(fd, TCP_NODELAY, &val) < 0)
243 LOG_WARN("failed to set TCP_NODELAY");
244 return fd;
245}
246
247// linux_sockaddr is required by f-stack api, and has the same layout to sockaddr
248static_assert(sizeof(linux_sockaddr) == sizeof(sockaddr));

Callers 2

create_streamMethod · 0.85
bindMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected