MCPcopy
hub / github.com/tsrpc/tsrpc / close

Method close

src/server/ws/WsConnection.ts:97–100  ·  view source on GitHub ↗
(reason?: ConnectionCloseReason)

Source from the content-addressed store, hash-verified

95 };
96
97 close(reason?: ConnectionCloseReason) {
98 // 已连接 Close之
99 this.options.ws.close(1000, reason || 'Server Closed');
100 }
101
102 get isClosed(): boolean {
103 return this.options.ws.readyState !== WebSocket.OPEN;

Callers 5

disconnectMethod · 0.45
onDataFunction · 0.45
stopMethod · 0.45
WsServerClass · 0.45
cleanMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected