14 Commits

Author SHA1 Message Date
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
tersec
be16a6528a
work around Nim 2.0.10 issue (#225)
* work around Nim 2.0.10 issue

* adjust Json/JSON capitalization in tests
2024-10-04 03:50:33 +00:00
andri lim
f40a8ba5c8
Add redefine pragma to inner template (#220) 2024-06-18 23:00:47 +07:00
andri lim
47cfc8916f
Improve batch call example and wrapper comments (#214) 2024-02-19 08:52:10 +07:00
andri lim
165e54133d
Add framework to support more optional types (#206)
* Add framework to support more optional types

This PR add a framework to rpc server by using more templates than macros to handle optional types.
Now rpc server recognize both `std/options` and `results.Opt` as optional type for the parameters.
If needed user can add more optional types by overloading `rpc_isOptional` template.
Now aliases to optional types also works.

* Don't expose types used internally by the wrapper
2024-02-02 14:14:37 +07:00
jangko
0b8cec3aa8
Implement RPC batch call both in servers and clients 2024-01-31 13:13:41 +07:00
andri lim
8d79d52841
Improve both client and server resilience against fields and elements with null value (#195)
* Improve resilience against null fields

* Fix client processMessage when handling error

* Improve both client and server resilience against fields and elements with null value
2024-01-17 14:10:05 +07:00
jangko
97d19b9583
Add comments in wrapper generator 2024-01-12 08:33:29 +07:00
jangko
ab3dd0009b
RPC server handle null return value correctly 2024-01-11 13:57:18 +07:00
jangko
08ceae27e0
Move errors module back to json_rpc folder 2024-01-08 10:37:29 +07:00
jangko
834de413d9
Rename jrpc_sys module back to jsonmarshal 2024-01-04 11:40:22 +07:00
jangko
014658d1e4
Fix optional parameter parsing fails in rpc macro with generics 2024-01-04 11:17:31 +07:00
jangko
76dd352ace
Remove StringOfJson 2024-01-04 07:49:19 +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