aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/websocket.go
Commit message (Collapse)AuthorAgeFilesLines
* rpc: fixup change to not verify websocket origin (#19128)Felix Lange2019-02-191-1/+1
| | | | This corrects the previous change which broke the build and was pushed by accident.
* rpc: skip websocket origin check if there is no origin headerFelix Lange2019-02-191-0/+7
|
* rpc: implement full bi-directional communication (#18471)Felix Lange2019-02-041-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | New APIs added: client.RegisterName(namespace, service) // makes service available to server client.Notify(ctx, method, args...) // sends a notification ClientFromContext(ctx) // to get a client in handler method This is essentially a rewrite of the server-side code. JSON-RPC processing code is now the same on both server and client side. Many minor issues were fixed in the process and there is a new test suite for JSON-RPC spec compliance (and non-compliance in some cases). List of behavior changes: - Method handlers are now called with a per-request context instead of a per-connection context. The context is canceled right after the method returns. - Subscription error channels are always closed when the connection ends. There is no need to also wait on the Notifier's Closed channel to detect whether the subscription has ended. - Client now omits "params" instead of sending "params": null when there are no arguments to a call. The previous behavior was not compliant with the spec. The server still accepts "params": null. - Floating point numbers are allowed as "id". The spec doesn't allow them, but we handle request "id" as json.RawMessage and guarantee that the same number will be sent back. - Logging is improved significantly. There is now a message at DEBUG level for each RPC call served.
* rpc: enable basic auth for websocket client (#17699)Peter Broadhurst2018-09-201-6/+21
|
* all: switch out defunct set library to different one (#16873)Ralph Caraveo III2018-07-161-5/+5
| | | | | | * keystore, ethash, eth, miner, rpc, whisperv6: tech debt with now defunct set. * whisperv5: swap out gopkg.in/fatih/set.v0 with supported set
* rpc: enforce the 128KB request limits on websockets tooPéter Szilágyi2018-03-131-1/+29
|
* rpc: warn on WebSocket origin mismatch (#15451)Benoit Verkindt2017-11-101-1/+1
| | | Fixes #15373
* cmd/utils, node: remove unused solc references and improve RPC config (#14324)bas-vk2017-04-131-3/+3
| | | | | Currently http cors and websocket origins are a comma separated string in the config object. These are replaced with string arrays that are more expressive in case of a config file.
* all: import "context" instead of "golang.org/x/net/context"Felix Lange2017-03-231-2/+17
| | | | | | | | | | There is no need to depend on the old context package now that the minimum Go version is 1.7. The move to "context" eliminates our weird vendoring setup. Some vendored code still uses golang.org/x/net/context and it is now vendored in the normal way. This change triggered new vet checks around context.WithTimeout which didn't fire with golang.org/x/net/context.
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-4/+4
|
* rpc: add new client, use it everywhereFelix Lange2016-07-231-95/+65
| | | | | | The new client implementation supports concurrent requests, subscriptions and replaces the various ad hoc RPC clients throughout go-ethereum.
* rpc: HTTP origin case insensitiveBas van Kervel2016-05-111-4/+4
|
* rpc: various fixes/enhancementsBas van Kervel2016-04-121-2/+2
| | | | | | | | rpc: be less restrictive on the request id rpc: improved documentation console: upgrade web3.js to version 0.16.0 rpc: cache http connections rpc: rename wsDomains parameter to wsOrigins
* rpc: add pub/sub supportBas van Kervel2016-04-021-1/+2
|
* cmd, node, rpc: readd inproc RPC client, expose via nodePéter Szilágyi2016-02-091-1/+1
|
* cmd, node, rpc: move websockets into node, break singletonPéter Szilágyi2016-02-051-65/+11
|
* rpc: migrated the RPC insterface to a new reflection based RPC layerBas van Kervel2016-01-261-0/+235