* Fix cast[pointer] issues on nim-devel.
* More cast[T] fixes.
* Fix compilation error.
* Add oserrno.nim
Further fixes for Windows and Linux.
* MacOS fixes.
* More Windows fixes and attempt to fix 1.2, 1.4 branches.
* Implicitly import/export oserrno.
* Replace oserrno with osdefs.
* Return back oserrno.
* epoll to oserrno.
* datagram/stream to oserrno.
* common to oserrno.
* test to oserrno.
Remove `result` usage.
Remove cast[T] usage.
Add more helpers for TransportAddress checks.
Add isGlobal() helper to check if TransportAddress is globally accessed IP address.
Add tests.
Add more tests for sub.
Add TransportAddress.toHex().
* Fix some warnings messages.
* More warning fixes.
* Address review comments.
Fix MacOS issues.
* More warning fixes.
* More Windows specific fixes.
* Fix macos and windows warnings.
* Fix warnings in timer.nim
Refactor to remove `result`.
Improve performance and behavior of timer to string procedure.
Add tests.
`nim doc --project --index:on chronos.nim` was failing with the following error:
/path/to/nim-chronos/chronos/transports/common.nim(519, 21) Error: '*' expected
...which in turned caused errors in all files that import this one.
Now the entire docs can be built successfully, with only a few warnings.
Fixes#186.
* Add more accept() call error handlers.
Fix issue when HTTP server silently stops accepting new connections.
Remove unneeded MacOS syscall to disable SIG_PIPE on socket, we already mask this signal in process.
* User `if` instead `case` because constants are actually variables.
* Fix mistypes.
* Do not use case for posix constants.
* Fix Linux compilation error.
* Initial commit.
* Some refactoring.
* Allow boundstream to accept uint64.
Fix httpserver and asyncstream tests to follow new uint64 requirement.
* send() and getBodyBytes() implementations.
* Add closeWait for response and request.
Refactor finish/close flow.
* Changes in state machine
Add first test.
* Missing test file.
* Fixed tests
Add http leaking trackers and tests.
* Some fixes in multipart.
Fix automatic Content-Length header for requests with body.
Fix getBodyBytes() assertions.
Merging tests to main suite.
* Post rebase fixes.
* Fix tests big message generation.
* Fix response state management and leaks for getBodyXXX() procedures.
* Add redirection support to client and server.
Add fetch(url) procedure with redirection support.
Add tests for redirection.
* Refactor common.nim to remove `result` usage.
Fix comparison of TransportAddress issue.
Add resolveTAddress procedures for both IPv4 and IPv6 addresses.
Fix tests.
* Bump version to 3.0.2.
* exception tracking
This PR adds minimal exception tracking to chronos, moving the goalpost
one step further.
In particular, it becomes invalid to raise exceptions from `callSoon`
callbacks: this is critical for writing correct error handling because
there's no reasonable way that a user of chronos can possibly _reason_
about exceptions coming out of there: the event loop will be in an
indeterminite state when the loop is executing an _random_ callback.
As expected, there are several issues in the error handling of chronos:
in particular, it will end up in an inconsistent internal state whenever
the selector loop operations fail, because the internal state update
functions are not written in an exception-safe way. This PR turns this
into a Defect, which probably is not the optimal way of handling things
- expect more work to be done here.
Some API have no way of reporting back errors to callers - for example,
when something fails in the accept loop, there's not much it can do, and
no way to report it back to the user of the API - this has been fixed
with the new accept flow - the old one should be deprecated.
Finally, there is information loss in the API: in composite operations
like `poll` and `waitFor` there's no way to differentiate internal
errors from user-level errors originating from callbacks.
* store `CatchableError` in future
* annotate proc's with correct raises information
* `selectors2` to avoid non-CatchableError IOSelectorsException
* `$` should never raise
* remove unnecessary gcsafe annotations
* fix exceptions leaking out of timer waits
* fix some imports
* functions must signal raising the union of all exceptions across all
platforms to enable cross-platform code
* switch to unittest2
* add `selectors2` which supercedes the std library version and fixes
several exception handling issues in there
* fixes
* docs, platform-independent eh specifiers for some functions
* add feature flag for strict exception mode
also bump version to 3.0.0 - _most_ existing code should be compatible
with this version of exception handling but some things might need
fixing - callbacks, existing raises specifications etc.
* fix AsyncCheck for non-void T