Commit graph

18 commits

Author SHA1 Message Date
Dominik Picheta
192e11e7b7 Many renames. Created high level asyncnet module. 2014-03-22 22:33:53 +00:00
Dominik Picheta
2ce9f1c77f Copied most blocking socket operations to the net module. 2014-03-22 22:33:53 +00:00
Dominik Picheta
ca6b4bf0f9 Asyncio2 doc improvements. Changed recvLine's behaviour.
recvLine had an edge case where it would return a partial line if the
socket were to be disconnected in the middle of a line being read. The
behaviour now is that the data is simply lost as it likely will be
unparsable by the protocol anyway.
2014-03-22 22:33:51 +00:00
Dominik Picheta
de64e8ec22 PFuture[void] now works.
Return types can also be completely ommitted. PFuture[void] will then be
implicitly deduced.
2014-03-15 00:11:01 +00:00
Dominik Picheta
afb7dbf81a Fixes compilation of asyncio2 on Windows.
Added a close(PDispatcher, TSocketHandle) implementation which unregisters
the handle.
2014-03-14 20:18:51 +00:00
Dominik Picheta
1a75b17cd0 File descriptors are now removed from fds list explicitly in close().
Fixes tasyncawait on linux.
2014-03-14 18:46:08 +00:00
Dominik Picheta
d2f130c3fc Fix compilation on linux. 2014-03-12 23:19:40 +00:00
Dominik Picheta
d97a397139 Fixed tasyncawait on Windows.
Implicit registration of an fd now only occurs when a new socket is
created (in socket() or accept()). This makes the implementation much
simpler, changes to the linux version will follow.
2014-03-12 20:42:36 +00:00
Dominik Picheta
2ce07042fd tasyncawait now works on Linux.
Reworked detection of a file descriptor being closed with epoll (in the
case of sockets it is when the remote host disconnects). Ensured that
events are only updated when they change.
2014-03-11 21:53:35 +00:00
Dominik Picheta
a097526956 Fixes to asyncio2 on Linux. 2014-03-09 13:49:38 +00:00
Dominik Picheta
3b5825e9bc Implemented selector support for asyncio2. 2014-02-22 17:22:19 +00:00
Dominik Picheta
17ef758cc3 Fix processing of 'await' with a nnkCall.
Specifically, ``discard readMessages(disp, await disp.accept(server))``
works now, i.e. using 'await' as one of the params to a proc call.
2014-02-16 19:56:17 +00:00
Dominik Picheta
7d2ed73a62 Fixes issues with 'discard' in async macro. 2014-02-16 13:55:06 +00:00
Dominik Picheta
fb7598d25a Async readLine now works. Fixes recv issues.
When using MSG_PEEK and data is retrieved ``lpNumberOfBytesRecvd`` will
not be set to the number of bytes read by WSARecv. The buffer must
therefore be checked to ensure it's empty when determining whether
``recv`` shall return "" to signal disconnection as we want to read as
much data as has been received by the system.
2014-02-15 21:13:23 +00:00
Dominik Picheta
de8d473301 Fixed problems with IOCP procs finishing immediately, added await macro. 2014-02-15 14:15:18 +00:00
Dominik Picheta
7e7f5a6927 Rename PFutureVoid to PFutureBase. 2014-02-12 21:27:00 +00:00
Dominik Picheta
76e8efe36e Added a generic-lacking version of PFuture. 2014-02-08 22:59:40 +00:00
Dominik Picheta
eedf51e9d1 Added new sockets modules: asyncio2, net, and sockets2. 2014-02-08 16:08:03 +00:00