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

Method stopHTTP

node/node.go:348–359  ·  view source on GitHub ↗

stopHTTP terminates the HTTP RPC endpoint.

()

Source from the content-addressed store, hash-verified

346
347// stopHTTP terminates the HTTP RPC endpoint.
348func (n *Node) stopHTTP() {
349 if n.httpListener != nil {
350 _ = n.httpListener.Close()
351 n.httpListener = nil
352
353 n.log.Info("HTTP endpoint closed", "url", fmt.Sprintf("http://%s", n.httpEndpoint))
354 }
355 if n.httpHandler != nil {
356 n.httpHandler.Stop()
357 n.httpHandler = nil
358 }
359}
360
361// startWS initializes and starts the websocket RPC endpoint.
362func (n *Node) startWS(endpoint string, apis []rpc.API, modules []string, wsOrigins []string, exposeAll bool) error {

Callers 3

startRPCMethod · 0.95
stopRPCMethod · 0.95
StopRPCMethod · 0.80

Calls 3

CloseMethod · 0.65
InfoMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected