Anton Kaliaev
b700ed8e31
remove check for non-empty message as it should always be present
8 years ago
Anton Kaliaev
6c1572c9b8
fix invalid memory address or nil pointer dereference
8 years ago
Dave Bryson
60a1f49a5c
updated json response to match spec by @davebryson
8 years ago
Ethan Buchman
9dde1a0bd4
rpc: comments
7 years ago
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
Anton Kaliaev
236489aecf
backlog must always have higher priority
7 years ago
Ethan Buchman
797acbe911
ws: small comment
7 years ago
Anton Kaliaev
8267920749
[ws-client] write normal close message
7 years ago
Anton Kaliaev
23a87304cc
add a comment for PingPongLatencyTimer [ci skip]
7 years ago
Anton Kaliaev
57eee2466b
make WSClient thread-safe
7 years ago
Anton Kaliaev
5d66d1c28c
fixes from review
8 years ago
Anton Kaliaev
0013053fae
allow to change pong wait and ping period
8 years ago
Anton Kaliaev
1abbb11b44
do not exit from reconnectRoutine!
8 years ago
Anton Kaliaev
54903adeff
add IsReconnecting and IsActive methods
8 years ago
Anton Kaliaev
c08618f7e9
expose latency timer on WSClient
8 years ago
Anton Kaliaev
d578f7f81e
biff up WS client
What's new:
- auto reconnect
- ping/pong
- colored tests
8 years ago
Ethan Frey
aac85a14f0
httpDialer accepts no prefix or http:// as tcp://
8 years ago
Anton Kaliaev
b4ece65726
standardize key for errors (should be "err")
8 years ago
Anton Kaliaev
f8fdbe3dbc
changes as per Bucky's review
8 years ago
Anton Kaliaev
f803544195
new logging
8 years ago
Ethan Frey
6ba799132c
json.RawMessage in RPCRequest to defer parsing
8 years ago
Ethan Buchman
efeadcc0f4
some cleanup from review
8 years ago
Ethan Frey
6c60c07f16
BROKEN: attempt to replace go-wire.JSON with json.Unmarshall in rpc
8 years ago
Ethan Buchman
cc6dde96c1
rpc -> rpc/lib and rpc/tendermint -> rpc
8 years ago