Anton Kaliaev
2fd8496bc1
correct handling of pings and pongs
server:
- always has read & write timeouts
- ping handler never blocks the reader (see A)
- sends regular pings to check up on a client
A:
at some point server write buffer can become full, so in order not to
block reads from a client (see
https://github.com/gorilla/websocket/issues/97 ), server may skip some
pongs. As a result, client may disconnect. But you either have to do
that or block the reader. There is no third way.
client:
- optional read & write timeouts
- optional ping/pong to measure latency
7 years ago
Ethan Buchman
b0728260e9
comments
7 years ago
Anton Kaliaev
236489aecf
backlog must always have higher priority
7 years ago
Ethan Buchman
797acbe911
ws: small comment
7 years ago
Anton Kaliaev
9b5f21a650
[ws-server] reset readTimeout when we receive something
7 years ago
Anton Kaliaev
8267920749
[ws-client] write normal close message
7 years ago
Anton Kaliaev
6c85e4be4f
change server ping period to be less frequent
no need to ping ws every 10 sec
7 years ago
Anton Kaliaev
23a87304cc
add a comment for PingPongLatencyTimer [ci skip]
7 years ago
Anton Kaliaev
c14b39da5f
make RPC server's ping period and pong wait configurable via options
7 years ago
Anton Kaliaev
57eee2466b
make WSClient thread-safe
7 years ago
Anton Kaliaev
5d66d1c28c
fixes from review
7 years ago
Anton Kaliaev
0013053fae
allow to change pong wait and ping period
7 years ago
Anton Kaliaev
1abbb11b44
do not exit from reconnectRoutine!
7 years ago
Anton Kaliaev
54903adeff
add IsReconnecting and IsActive methods
7 years ago
Anton Kaliaev
c08618f7e9
expose latency timer on WSClient
7 years ago
Anton Kaliaev
d578f7f81e
biff up WS client
What's new:
- auto reconnect
- ping/pong
- colored tests
7 years ago
Anton Kaliaev
5fea1d2675
[.editorconfig] add rule for .proto files [ci skip]
7 years ago
Ethan Buchman
d8ca0580a8
rpc: move grpc_test from test/ to grpc/
7 years ago
ramil
6f8d385dfa
fast sync status
7 years ago
Adrian Brink
05c0dfac12
First crack it providing fast-sync endpoint
7 years ago
Ethan Buchman
0d1fa8e884
fixes from review
8 years ago
Ethan Buchman
e2ed15fa02
rpc: SetWriteDeadline for ws ping. fixes #553
8 years ago
Ethan Buchman
b6031d5f4b
rpc/lib: set logger on ws conn
8 years ago
Ethan Buchman
5c29d7aba9
rpc/lib: test tcp and unix
8 years ago
Ethan Frey
aac85a14f0
httpDialer accepts no prefix or http:// as tcp://
8 years ago
Anton Kaliaev
eaec0c8ea5
deduplicate tests in rpc/test and rpc/client (Refs #496 )
8 years ago
Anton Kaliaev
b4ece65726
standardize key for errors (should be "err")
8 years ago
zramsay
cf31f8d06f
core: apply megacheck vet tool (unused, gosimple, staticcheck)
8 years ago
Ethan Buchman
bd7ec18c19
fix tests
8 years ago
Ethan Buchman
4f27752468
[rpc] dont enable unsafe by default; limit /blockchain_info to 20 blocks
8 years ago
spring1843
cf686d4f83
Fix commonly misspelled words
8 years ago
Ethan Frey
2b324b7eb9
RPC returns pretty formated json
8 years ago
Anton Kaliaev
f8fdbe3dbc
changes as per Bucky's review
8 years ago
Anton Kaliaev
f803544195
new logging
8 years ago
Ethan Buchman
75989342b0
fixes from rebase
8 years ago
Ethan Buchman
46151720f8
fix tests
8 years ago
Ethan Buchman
6afee8f117
rpc: fix tests
8 years ago
Ethan Buchman
f0e7f0acf8
remove viper from rpc except test
8 years ago
Ethan Buchman
9860c8fee1
rpc: cleanup some comments [ci skip]
8 years ago
Ethan Frey
4a1b714ca4
All tests pass without go-wire json ptr madness
8 years ago
Ethan Frey
4c1d41c12e
Test json rpc parsing
8 years ago
Ethan Frey
6ba799132c
json.RawMessage in RPCRequest to defer parsing
8 years ago
Ethan Buchman
6dbcfb32d2
comment on copied wire file
8 years ago
Ethan Buchman
efeadcc0f4
some cleanup from review
8 years ago
Ethan Buchman
4e781961e9
remove TMResult. ::drinks champagne::
8 years ago
Ethan Buchman
884060eb9b
rpc/lib: no Result wrapper
8 years ago
Ethan Buchman
07e59e63f9
TMEventDataInner
8 years ago
Ethan Buchman
ac28b12fa8
add readReflectJSON from wire
8 years ago
Ethan Frey
257f45b768
ebuchman: added some demos on how to parse unknown types
8 years ago
Ethan Buchman
acfbea6d49
rpc: decode args without wire
8 years ago