StopRPC terminates an already running HTTP RPC API endpoint.
()
| 152 | |
| 153 | // StopRPC terminates an already running HTTP RPC API endpoint. |
| 154 | func (api *PrivateAdminAPI) StopRPC() (bool, error) { |
| 155 | api.node.lock.Lock() |
| 156 | defer api.node.lock.Unlock() |
| 157 | |
| 158 | if api.node.httpHandler == nil { |
| 159 | return false, fmt.Errorf("HTTP RPC not running") |
| 160 | } |
| 161 | api.node.stopHTTP() |
| 162 | return true, nil |
| 163 | } |
| 164 | |
| 165 | // StartWS starts the websocket RPC API server. |
| 166 | func (api *PrivateAdminAPI) StartWS(host *string, port *int, allowedOrigins *string, apis *string) (bool, error) { |