Cosmetic changes.
This commit is contained in:
parent
989c999dc7
commit
19b3b3aa6d
|
@ -16,13 +16,10 @@ proc call*(self: RpcSocketClient, name: string,
|
||||||
params: JsonNode): Future[Response] {.async.} =
|
params: JsonNode): Future[Response] {.async.} =
|
||||||
## Remotely calls the specified RPC method.
|
## Remotely calls the specified RPC method.
|
||||||
let id = self.getNextId()
|
let id = self.getNextId()
|
||||||
|
var value = $rpcCallNode(name, params, id) & "\c\l"
|
||||||
var
|
|
||||||
value =
|
|
||||||
$rpcCallNode(name, params, id) & "\c\l"
|
|
||||||
if self.transport.isNil:
|
if self.transport.isNil:
|
||||||
var connectStr = ""
|
raise newException(ValueError,
|
||||||
raise newException(ValueError, "Transport is not initialised (missing a call to connect?)")
|
"Transport is not initialised (missing a call to connect?)")
|
||||||
let res = await self.transport.write(value)
|
let res = await self.transport.write(value)
|
||||||
# TODO: Add actions when not full packet was send, e.g. disconnect peer.
|
# TODO: Add actions when not full packet was send, e.g. disconnect peer.
|
||||||
assert(res == len(value))
|
assert(res == len(value))
|
||||||
|
|
Loading…
Reference in New Issue