node: allow websocket and HTTP on the same port (#20810)
This change makes it possible to run geth with JSON-RPC over HTTP and WebSocket on the same TCP port. The default port for WebSocket is still 8546. geth --rpc --rpcport 8545 --ws --wsport 8545 This also removes a lot of deprecated API surface from package rpc. The rpc package is now purely about serving JSON-RPC and no longer provides a way to start an HTTP server.
Showing
- cmd/clef/main.go 8 additions, 1 deletioncmd/clef/main.go
- cmd/geth/retesteth.go 9 additions, 1 deletioncmd/geth/retesteth.go
- graphql/service.go 13 additions, 1 deletiongraphql/service.go
- node/api.go 1 addition, 1 deletionnode/api.go
- node/endpoints.go 99 additions, 0 deletionsnode/endpoints.go
- node/node.go 58 additions, 11 deletionsnode/node.go
- node/node_test.go 58 additions, 0 deletionsnode/node_test.go
- node/rpcstack.go 159 additions, 0 deletionsnode/rpcstack.go
- node/rpcstack_test.go 38 additions, 0 deletionsnode/rpcstack_test.go
- rpc/endpoints.go 0 additions, 83 deletionsrpc/endpoints.go
- rpc/http.go 0 additions, 97 deletionsrpc/http.go
- rpc/websocket.go 0 additions, 7 deletionsrpc/websocket.go
Loading
Please register or sign in to comment