MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / sendWebSocketClose

Function sendWebSocketClose

src/Server/WebTerminalRequestHandler.cpp:125–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void sendWebSocketClose(Poco::Net::StreamSocket & socket, uint16_t code, const String & reason)
126{
127 String payload;
128 payload.push_back(static_cast<char>((code >> 8) & 0xFF));
129 payload.push_back(static_cast<char>(code & 0xFF));
130 payload.append(reason);
131 sendWebSocketFrame(socket, 0x08, payload.data(), payload.size());
132}
133
134/// Read exactly n bytes from the socket.
135/// If deadline_ns is non-zero, abort when the monotonic clock exceeds it.

Callers 1

Calls 5

sendWebSocketFrameFunction · 0.85
push_backMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected