stopHTTP terminates the HTTP RPC endpoint.
()
| 346 | |
| 347 | // stopHTTP terminates the HTTP RPC endpoint. |
| 348 | func (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. |
| 362 | func (n *Node) startWS(endpoint string, apis []rpc.API, modules []string, wsOrigins []string, exposeAll bool) error { |