mirror of
https://github.com/logos-storage/nim-json-rpc.git
synced 2026-01-05 15:13:11 +00:00
fix both ws rpc server and client due to websock breaking changes
- change recv() to recvMsg()
This commit is contained in:
parent
a1715e33ac
commit
b2417fc071
@ -46,7 +46,7 @@ proc processData(client: RpcWebSocketClient) {.async.} =
|
||||
let ws = client.transport
|
||||
try:
|
||||
while ws.readystate != ReadyState.Closed:
|
||||
var value = await ws.recv()
|
||||
var value = await ws.recvMsg()
|
||||
|
||||
if value.len == 0:
|
||||
# transmission ends
|
||||
|
||||
@ -26,7 +26,7 @@ proc handleRequest(rpc: RpcWebSocketServer, request: HttpRequest) {.async.} =
|
||||
|
||||
trace "Websocket handshake completed"
|
||||
while ws.readyState != ReadyState.Closed:
|
||||
let recvData = await ws.recv()
|
||||
let recvData = await ws.recvMsg()
|
||||
trace "Client message: ", size = recvData.len, binary = ws.binary
|
||||
|
||||
if ws.readyState == ReadyState.Closed:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user