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

Method accept

net/kernel_socket.cpp:356–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354 }
355
356 ISocketStream* accept(EndPoint* remote_endpoint = nullptr) override {
357 int cfd = remote_endpoint ? do_accept(*remote_endpoint) : do_accept();
358 if (cfd < 0) {
359 return nullptr;
360 }
361 if (m_opts.setsockopt(cfd) != 0) {
362 return nullptr;
363 }
364 return create_stream(cfd);
365 }
366
367 Object* get_underlay_object(uint64_t recursion = 0) override {
368 return (Object*) (uint64_t) m_listen_fd;

Callers

nothing calls this directly

Calls 1

setsockoptMethod · 0.45

Tested by

no test coverage detected