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

Function new_stream

net/kernel_socket.cpp:81–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81template<typename Stream> inline
82Stream* new_stream(int family, int protocol = 0, bool nonblocking = true) {
83 int fd = socket(family, protocol, nonblocking, family != AF_UNIX);
84 return (fd < 0) ? nullptr : new Stream(fd);
85}
86
87class KernelSocketStream : public SocketStreamBase {
88public:

Callers

nothing calls this directly

Calls 1

socketFunction · 0.70

Tested by

no test coverage detected