MCPcopy Create free account
hub / github.com/dfranx/SHADERed / accept

Method accept

libs/cppdap/src/socket.cpp:239–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

237}
238
239std::shared_ptr<ReaderWriter> Socket::accept() const {
240 std::shared_ptr<Shared> out;
241 if (shared) {
242 shared->lock([&](SOCKET socket, const addrinfo*) {
243 if (socket != InvalidSocket) {
244 init();
245 out = std::make_shared<Shared>(::accept(socket, 0, 0));
246 out->setOptions();
247 }
248 });
249 }
250 return out;
251}
252
253bool Socket::isOpen() const {
254 if (shared) {

Callers 2

TESTFunction · 0.45
startMethod · 0.45

Calls 4

initFunction · 0.85
lockMethod · 0.80
setOptionsMethod · 0.80
acceptFunction · 0.50

Tested by 1

TESTFunction · 0.36