MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / stop

Method stop

Libraries/Http/HttpAsyncServer.cpp:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 externalListener = true;
64 state = State::Started;
65 return Result(true);
66}
67
68Result HttpAsyncServer::acceptExternalConnection(HttpConnection& connection, AsyncReadableStream& readable,
69 AsyncWritableStream& writable)
70{
71 SC_TRY_MSG(state == State::Started and externalListener,
72 "HttpAsyncServer::acceptExternalConnection requires an external listener");
73 HttpConnection::ID connectionID;
74 SC_TRY_MSG(connections.activate(connection, connectionID),
75 "HttpAsyncServer::acceptExternalConnection slot unavailable");
76
77 connection.resetTransportStreams();
78 connection.setTransportStreams(readable, writable);
79 Result setup = beginTransportConnection(connection);
80 if (not setup)
81 {
82 closeAsync(connection);
83 return setup;
84 }
85 return Result(true);
86}
87

Callers 1

closeMethod · 0.45

Calls 3

isFreeMethod · 0.80
ResultClass · 0.50
destroyMethod · 0.45

Tested by

no test coverage detected