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

Method join

Libraries/Http/HttpWebSocket.cpp:1447–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1445}
1446
1447Result HttpWebSocketSmallHub::join(const HttpWebSocketTransportView& transport, size_t& clientIndex)
1448{
1449 SC_TRY_MSG(transport.isValid(), "HttpWebSocketSmallHub transport is invalid");
1450 for (size_t idx = 0; idx < clients.sizeInElements(); ++idx)
1451 {
1452 HttpWebSocketHubClient& client = clients[idx];
1453 if (not client.active)
1454 {
1455 client.transport = transport;
1456 client.active = true;
1457 clientIndex = idx;
1458 numClients++;
1459 return Result(true);
1460 }
1461 }
1462 return Result::Error("HttpWebSocketSmallHub is full");
1463}
1464
1465Result HttpWebSocketSmallHub::leave(size_t clientIndex)
1466{

Callers 15

blockingGetMethod · 0.45
blockingPostMethod · 0.45
blockingCustomHeadersMethod · 0.45
contentCodingPolicyMethod · 0.45
blockingTimeoutMethod · 0.45
protocolPreferenceMethod · 0.45
proxyOptionsMethod · 0.45
cancelRequestMethod · 0.45
methodCoverageMethod · 0.45

Calls 3

ResultClass · 0.50
ErrorEnum · 0.50
isValidMethod · 0.45

Tested by 15

blockingGetMethod · 0.36
blockingPostMethod · 0.36
blockingCustomHeadersMethod · 0.36
contentCodingPolicyMethod · 0.36
blockingTimeoutMethod · 0.36
protocolPreferenceMethod · 0.36
proxyOptionsMethod · 0.36
cancelRequestMethod · 0.36
methodCoverageMethod · 0.36