Commit Graph

115 Commits

Author SHA1 Message Date
Andreas Rumpf
55cb959a68 make tests green again; closes #5861 2017-10-10 09:18:31 +02:00
Arne Döring
ddea990a70 removed newString proc again, reverted some unnecesary changes 2017-07-24 23:21:51 +02:00
Yuriy Glukhov
bdf6f59c6d Fixes #5738 (#6059) 2017-07-15 08:50:41 +02:00
Dominik Picheta
8b107972c5 Merge pull request #5938 from zielmicha/futures
[WIP] Better Future
2017-07-14 20:18:06 +01:00
Euan T
7e4ca9a871 Update test header
Signed-off-by: Euan T <euantorano@gmail.com>
2017-07-10 09:23:45 +01:00
Euan Torano
3f3853945d Adding test for recvline
Signed-off-by: Euan Torano <euantorano@gmail.com>
2017-07-09 20:50:47 +01:00
Michał Zieliński
797690ba3f Future: support for multiple callbacks 2017-07-05 12:54:09 +02:00
Michał Zieliński
e86863e8f5 asyncdispatch: split asyncfutures into its own module
This slightly changes behaviour of callSoon - before loop is initialized, callSoon will call the function immediately.
2017-07-05 12:54:09 +02:00
Eugene Kabanov
907c488a61 One more attempt to fix tioselectors.nim test (#6020) 2017-06-27 12:14:53 +02:00
Yuriy Glukhov
58eae1171d Fixes #5995 2017-06-18 00:57:05 +03:00
Yuriy Glukhov
6599cae281 Async macro fixes (#5739) 2017-05-16 22:09:19 +02:00
Federico Ceratto
fcd86883ed Add waitFor on seq[Future], waitAll and more (#5189)
* Switch to unittest and speedup

* Make timers and callbacks fields public
2017-05-16 14:36:21 +01:00
Andreas Rumpf
3afd852f54 Fixes #5532 win async write (#5791)
* nimgrab tool bugfix: don't divide by zero
* fixes #5532 (asyncfile write on Windows)
* add a comment about what has been tried instead
2017-05-14 17:10:39 +02:00
Ruslan Mustakov
ecf278c467 Implement dial, support IPv6 in httpclient (#5763)
* Implement dial, support IPv6 in httpclient

Added ``dial`` procedure to networking modules: ``net``, ``asyncdispatch``,
``asyncnet``. It merges socket creation, address resolution, and connection
into single step. When using ``dial``, you don't have to worry about
IPv4 vs IPv6 problem.

Fixed addrInfo loop in connect to behave properly.
Previously it would stop on first non-immediate failure, instead of
continuing and trying the remaining addresses.

Fixed newAsyncNativeSocket to raise proper error if socket creation
fails.

Fixes: #3811

* Check domain during connect() only on non-Windows

This is how it was in the previous implementation of connect().

* Call 'osLastError' before 'close' in net.dial

* Record osLastError before freeAddrInfo in net.dial

* Add missing docs for 'dial' proc

* Optimize dial to create one FD per domain, add tests

And make async IPv6 servers work on Windows.

* Add IPv6 test to uri module

* Fix getAddrString error handling
2017-05-02 09:25:50 +02:00
Eugene Kabanov
050918aa2a Fix tioselectors.nim for appveyor. (#5694) 2017-04-12 08:43:41 +02:00
Emery Hemingway
bc5c2d8414 getFileSize and setFileSize procedures for File and AsyncFile
Platform independent procedure to set a file length. Useful when
replacing file content.
2017-04-05 19:05:43 -05:00
wt
c480505797 Fix wrong value range of ntohs ... (#5390) 2017-03-31 22:13:06 +02:00
Eugene Kabanov
3fc75b2ca4 Fix tioselectors.nim test timeouts to be executed in appveyor more stable. (#5622) 2017-03-29 08:32:16 +02:00
Eugene Kabanov
336a7c9b3f Fixes to support Dragonfly BSD. (#5552)
* Fix kqueue.nim and ansi_c.nim to support dragonfly.
* Fix ioselectors.nim, threads.nim to support dragonfly.
* Fix deprecated dealloc call in tioselectors.nim.
* Fix tfsmonitor.nim test to run only on Linux.
* Fix osproc.nim return wrong exit codes.
* Fix getAppFilename() for dragonfly.
* Fix proper exit code handling.
2017-03-17 08:22:11 +01:00
Eugene Kabanov
ac2f1996a8 asyncdispatch.nim recursion test. (#5534) 2017-03-14 20:03:13 +01:00
Dominik Picheta
f9cce32097 Various fixes to FutureStreams based on PR feedback. 2017-02-26 12:52:19 +01:00
Dominik Picheta
b053ded266 Fixes tests. 2017-02-11 16:49:02 +01:00
Dominik Picheta
2f502e2a9e Remove immediate FutureStream procs and make 'put' awaitable. 2017-02-10 20:40:32 +01:00
Dominik Picheta
ddd3d3f44a Improve implementation of takeAsync for FutureStreams. 2017-02-10 20:18:59 +01:00
Dominik Picheta
d87fb236d1 Add test spec to tfuturestream 2017-02-10 18:57:43 +01:00
Dominik Picheta
7766fdfec1 Implemented a first working version of FutureStreams. 2017-02-10 00:06:18 +01:00
Dominik Picheta
e189004a03 WIP implementation of FutureStream. 2017-02-09 22:46:20 +01:00
Araq
4790b6b203 Merge branch 'accept-close-race-5279' of https://github.com/endragor/Nim into endragor-accept-close-race-5279 2017-02-07 14:44:27 +01:00
Ruslan Mustakov
7a839d7b02 Move checkCloseError to nativesockets 2017-02-07 16:45:59 +07:00
Andreas Rumpf
072d79511f fixes #5314 2017-02-05 17:14:49 +01:00
cheatfate
95d8558f0c Fix #5331 and #5332. 2017-02-04 12:10:07 +01:00
Ruslan Mustakov
fb8168d338 Fix Windows accept() to fail future instead of raising
Resolves: #5279
2017-02-01 18:18:44 +07:00
Eugene Kabanov
d90f3f59ac Fixes for upcoming asyncdispatch and ioselectors. (#5309) 2017-02-01 12:12:26 +01:00
Eugene Kabanov
108f5e688e Fix #5128, #5184. (#5214)
* Fix #5128, #5184.
Removed flush() procedure from ioselectors.nim
Changed methods of work with application-driven data

* Make cache switch for kqueue, update test for it.

* Fix registerProcess bug returns wrong id.
Fix tupcoming_async test to compile with upcoming again.
Change socket() as unique identifier to dup(socket) as unique identifier.
2017-01-16 14:01:40 +01:00
Araq
bf8f00f717 make nimforum compile again 2016-12-31 11:37:58 +01:00
Anatoly Galiulin
8e71949b78 Add pending operations presence check function, fixes #5155 2016-12-29 17:27:03 +07:00
cheatfate
b59ce8d321 Fix compilation errors and enable async events on partially supported systems. 2016-12-07 14:08:53 +02:00
Ruslan Mustakov
f2bded180f async all() now immediately completes if arg is empty 2016-11-03 10:50:43 +07:00
Andreas Rumpf
a8dc4df8be removed async test that never produced reliable results 2016-10-20 15:20:57 +02:00
Andreas Rumpf
bae3baf9cc fixes #4856 2016-10-20 15:20:27 +02:00
Dominik Picheta
c188c2076b Merge pull request #4830 from cheatfate/disabletimetest
tupcoming_async: Disable real time test comparison
2016-09-25 17:18:58 +02:00
Dominik Picheta
927fce4c7f FutureVar[T] parameters are now completed automatically. 2016-09-25 16:05:22 +02:00
cheatfate
54977e3709 Disable time error test. 2016-09-25 15:28:57 +03:00
cheatfate
f40c1d3ad1 Add support for kqueue's EVFILT_VNODE (filesystem monitoring), and add test for it. 2016-09-24 05:16:39 +03:00
Dominik Picheta
1740619c0c Implements {.multisync.} pragma for async and sync proc combos. 2016-09-18 18:15:20 +02:00
Dominik Picheta
07c637c24c Increase error rate for upcoming timers test. 2016-09-17 22:09:10 +02:00
Simon Ruderich
38505e31c8 tests: tnewasyncudp: use constant 2016-09-17 18:11:12 +02:00
Dominik Picheta
75e5c87f15 Fixes #4170. 2016-09-17 14:19:26 +02:00
Dominik Picheta
5bf16439e1 Fixes #4262. 2016-09-17 13:22:04 +02:00
cheatfate
3d556a9719 Fix #4777 network buffers overflow because of immediate sendTo call. 2016-09-17 03:07:57 +03:00