MCPcopy Create free account
hub / github.com/Kitware/CMake / accept

Method accept

Utilities/cmcppdap/src/socket.cpp:250–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250std::shared_ptr<ReaderWriter> Socket::accept() const {
251 std::shared_ptr<Shared> out;
252 if (shared) {
253 shared->lock([&](SOCKET socket, const addrinfo*) {
254 if (socket != InvalidSocket && !errored(socket)) {
255 init();
256 auto accepted = ::accept(socket, 0, 0);
257 if (accepted != InvalidSocket) {
258 out = std::make_shared<Shared>(accepted);
259 out->setOptions();
260 }
261 }
262 });
263 }
264 return out;
265}
266
267bool Socket::isOpen() const {
268 if (shared) {

Callers 8

environmentDialogMethod · 0.80
catchShowMethod · 0.80
tryConfigureMethod · 0.80
tryGenerateMethod · 0.80
TESTFunction · 0.80
startMethod · 0.80
dragEnterEventMethod · 0.80
addEntryMethod · 0.80

Calls 4

erroredFunction · 0.85
initFunction · 0.85
lockMethod · 0.80
setOptionsMethod · 0.80

Tested by 5

environmentDialogMethod · 0.64
catchShowMethod · 0.64
tryConfigureMethod · 0.64
tryGenerateMethod · 0.64
TESTFunction · 0.64