MCPcopy Create free account
hub / github.com/CPChain/chain / StopWS

Method StopWS

node/api.go:208–217  ·  view source on GitHub ↗

StopWS terminates an already running websocket RPC API endpoint.

()

Source from the content-addressed store, hash-verified

206
207// StopWS terminates an already running websocket RPC API endpoint.
208func (api *PrivateAdminAPI) StopWS() (bool, error) {
209 api.node.lock.Lock()
210 defer api.node.lock.Unlock()
211
212 if api.node.wsHandler == nil {
213 return false, fmt.Errorf("WebSocket RPC not running")
214 }
215 api.node.stopWS()
216 return true, nil
217}
218
219// PublicAdminAPI is the collection of administrative API methods exposed over
220// both secure and unsecure RPC channels.

Callers

nothing calls this directly

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
stopWSMethod · 0.80

Tested by

no test coverage detected