Jacek Sieka
98a5efba4d
Various error handling and processing fixes ( #228 )
...
* remove redundant gcsafe/raises
* rework async raises to chronos 4.0 where this was not yet done
* streamline logging between http/socket/ws
* don't log error when raising exceptions (whoever handles should log)
* debug-log requests in all variants of server and client
* unify ipv4/ipv6 address resolution, with preference for ipv6
* fix server start so that it consistently raises only when no addresses
could be bound
2024-10-22 21:58:46 +02:00
Juan M Gómez
e27c10ad41
Some minimal changes to be able to base the nimlangserver in json_rpc ( #222 )
...
* adds processClientHook
This is useful to shape the request and response to defined protocols (i.e. lsp)
* overloads tryRoute
* apply suggestions
* update test
2024-07-23 17:05:54 +07:00
jangko
20b4c9a0fb
Let the OS choose the port for tests
2024-01-07 15:33:43 +07:00
andri lim
e0b077fea4
Upgrade rpc router internals ( #178 )
...
* Upgrade rpc router internals
* use new chronos asyncraises
* Fix style mismatch
* Fix nim v2 compilation error
* Addresing review
* Remove unnecessary custom serializer and let the library do the work
* fix error message
* Update readme.md
2024-01-03 20:06:53 +07:00
jangko
38950a786d
reduce compiler warnings
2023-02-22 12:00:35 +07:00
Jacek Sieka
c0ecb42613
normalise nimble, update ci, unittest2 ( #158 )
2022-12-02 13:17:27 +01:00
Jacek Sieka
b4aff8fec5
remove news support ( #155 )
...
`news` has several resource leaks and other security issues - replaced
by `nim-websock` which is actively maintained.
2022-11-08 14:39:29 +01:00
jangko
ad0c3fb6e0
fix missing req id in router exception handler
...
when an rpc method in server throw `InvalidRequest` using custom error code,
the router need to mention the request id too.
otherwise the client will throw error with confusing message.
2022-02-28 09:39:49 +07:00
Zahary Karadjov
35e6d7e6ff
Restore the support for using the news package
2021-11-29 15:36:17 +02:00
jangko
69e8be66fb
add compression support for websocket rpc server-client
...
fixes #62
2021-06-24 06:52:31 +07:00
jangko
ccb19734e6
add test cases for rpc websocket client-server
2021-06-24 06:52:31 +07:00
jangko
a79f10f10f
adapt testserverclient for upcoming websocket test
2021-06-23 16:09:44 +07:00
Jacek Sieka
4eb39203eb
fixes ( #95 )
...
* fixes
* fix https://github.com/status-im/nimbus-eth2/issues/1650
* only one of `result` and `error` allowed in response
* fix invalid `string` instances being created from byte sequences
* fix large int64 parsing on 32-bit
* fix exception inheritance
* fix some dangling results
* some cleanups
* annotate exception issues, fix cancellation
* more error handling cleanup
* add rudimentary error tests
* cleanups
* simplify init
* use nextId -> lastId to avoid =1 init
* remove obsolete tests
2021-02-15 13:45:51 +01:00
Zahary Karadjov
f53e0b960b
Fix all tests
2020-03-17 22:05:42 +02:00
coffeepots
5da9ce7881
Make all tests use port 8545 to check connection closing between tests
2018-09-13 19:27:51 +01:00
coffeepots
f0eb9693af
Use different port for socket test
2018-09-13 18:46:15 +01:00
coffeepots
0ba96afb13
Update socket test to use closeWait
2018-09-13 18:06:46 +01:00
Zahary Karadjov
642fdd591f
fix the package structure to make Nimble happy
2018-07-20 19:34:10 +03:00
coffeepots
6466b7e778
Update tests with newRpcSocketClient
2018-07-12 14:08:43 +01:00
coffeepots
e3a7ffd121
Merge rpcsocket into rpcserver
2018-07-12 09:43:44 +01:00
coffeepots
13ae592738
Rename sockets.nim to socket.nim and rpcsockets.nim to rpcsocket.nim
2018-07-11 10:40:20 +01:00
coffeepots
b218529d2d
Remove generics from server and update sockettransport
2018-07-11 10:19:13 +01:00
coffeepots
cf44cc552d
Remove DSL, add router and simplify server
2018-07-06 17:47:43 +01:00
coffeepots
79e756bd3c
Update tests to use rpcStreamClient
2018-06-22 19:06:03 +01:00
coffeepots
8d1174b136
Updated paths to use rpcserver now that streamservers are in there
2018-06-19 18:17:56 +01:00
coffeepots
746232a928
Revert "Rename rpcstreamserver and newStreamServer to rpcsocketserver and newSocketServer"
...
This reverts commit 0dfb4be55c4cbf852370b50971ba89f6539bf921.
2018-06-15 11:11:10 +01:00
coffeepots
0dfb4be55c
Rename rpcstreamserver and newStreamServer to rpcsocketserver and newSocketServer
2018-06-15 10:34:24 +01:00
coffeepots
bb07650f33
Update tests to use streamserver
2018-06-14 16:55:10 +01:00
cheatfate
2b12f3699a
Added reviews requirements.
2018-06-10 04:09:51 +03:00
cheatfate
aea1798897
Add close() procedure for RpcServer.
...
Fixed tests to stop/close server.
2018-06-07 11:20:33 +03:00
cheatfate
cbfe945fff
Use asyncdispatch2 instead of asyncdispatch.
2018-06-07 10:02:14 +03:00
coffeepots
efeb972763
Update tests to use async better, no shared server
2018-06-05 10:45:54 +01:00
coffeepots
6bfb4facc2
Remove var ref on rpc macro and just take ref
2018-06-04 15:34:48 +01:00
coffeepots
db55114233
Change example to invoke `rpc from within procedure scope
2018-06-04 14:16:35 +01:00
coffeepots
cdcd5204e3
Split tests into client-server test and ethprocs test
2018-05-30 16:36:55 +01:00
coffeepots
964436c9e3
Move ethprocs and ethtypes into tests, remove external imports
2018-05-30 16:36:55 +01:00
coffeepots
7aff489622
Move ethcallsigs to tests to confirm stand alone rpc setup
2018-05-30 16:36:55 +01:00
coffeepots
8b007ff2f4
Update comments and change web3_sha3 test to use example in wiki
2018-05-29 13:20:07 +03:00
coffeepots
d1470bf212
Updated test to use new generated client procs
2018-05-29 13:20:07 +03:00
coffeepots
ce86719f4c
on is now rpc for now to fix compilation issue
2018-05-29 13:20:07 +03:00
coffeepots
995f268ddf
Fix for zero parameter test
2018-05-29 13:20:07 +03:00
coffeepots
14ef63294e
fix result not found by changing import order...
2018-05-29 13:20:07 +03:00
coffeepots
34a89b6bb9
Update comment to be clearer
2018-05-29 13:20:07 +03:00
coffeepots
68dc4351d1
Fix undeclared identifier: result in myProc custom rpc
2018-05-29 13:20:07 +03:00
coffeepots
758653fb62
Remove {.rpc.} macro and merged testing into testrpcmacro
2018-05-29 13:20:07 +03:00
coffeepots
8a3aad64d1
Updated paths
2018-05-29 13:20:07 +03:00
coffeepots
da6ef049ca
Updated test to return input data
2018-05-29 13:20:07 +03:00
coffeepots
f15a48b1c2
Initialise ethprocs automatically on import rpcserver
2018-05-29 13:20:07 +03:00
coffeepots
c5653a8cfd
Update tests to run with nimble test
2018-05-29 13:20:07 +03:00
coffeepots
364fa6f031
Updated test to use new on macro
2018-05-29 13:20:07 +03:00