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

Method close

net/kernel_socket.cpp:141–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 return (Object*) (uint64_t) fd;
140 }
141 int close() final {
142 if (fd < 0) return 0;
143 get_vcpu()->master_event_engine->wait_for_fd(fd, 0, -1UL);
144 auto ret = ::close(fd);
145 fd = -1;
146 return ret;
147 }
148 int getsockname(EndPoint& addr) override {
149 return get_socket_name(fd, addr);
150 }

Callers

nothing calls this directly

Calls 2

get_vcpuFunction · 0.50
wait_for_fdMethod · 0.45

Tested by

no test coverage detected