summary refs log tree commit diff stats
path: root/lib/pure/asyncnet.nim
Commit message (Collapse)AuthorAgeFilesLines
* Rename rawsockets module to nativesocketsAdam Strzelecki2015-10-031-5/+6
| | | | | | | | | | This change was done to avoid confusion with TCP/IP raw sockets. Native sockets module represents handling native system low level socket API in general and is not just limited anyhow to TCP/IP raw sockets. A stub lib/deprecated/pure/rawsockets.nim module has been added as compatibility layer for old code using rawsockets, so this change will not break existing code.
* Fixes asyncnet.recvLine. Fixes #3346.Dominik Picheta2015-09-191-0/+1
|
* Reintroduce FutureVar[T] from commit 72b4912c84b16644657.Dominik Picheta2015-09-111-9/+25
|
* Free SSL handler to avoid memory leaksBruce Doan2015-07-311-1/+1
|
* Fixes socket problems on Windows and normalises some names.Dominik Picheta2015-06-291-15/+22
| | | | Ref #2976. Ref #2003. See news.txt for details.
* Make newAsyncSocket AF_INET6 the default domain.Andrew Yourtchenko2015-06-231-1/+1
|
* Make asyncnet.bindAddr IPv4+IPv6 compatible.Andrew Yourtchenko2015-06-231-15/+12
|
* Adjustments to #2610.Dominik Picheta2015-06-221-1/+10
|
* Merge branch 'starttls' of https://github.com/wiml/Nim into wiml-starttlsDominik Picheta2015-06-221-0/+9
|\ | | | | | | | | Conflicts: lib/pure/net.nim
| * Make the post-connection wrapSocket() call available in both the synchronous ↵Wim Lewis2015-04-261-9/+4
| | | | | | | | and asynchrinous net modules.
| * Add a handshake parameter to wrapSocket() to allow it to work on an ↵Wim Lewis2015-04-231-1/+15
| | | | | | | | already-connected socket.
* | Merge branch 'exportnewsocket' of https://github.com/boopcat/Nim into ↵Dominik Picheta2015-06-051-3/+3
|\ \ | | | | | | | | | | | | | | | | | | boopcat-exportnewsocket Conflicts: lib/pure/asyncnet.nim
| * | Export newSocket(fd) from net.nim and standardize args in net/asyncnetboopcat2015-05-301-3/+3
| | | | | | | | | | | | | | | | | | | | | Exporting newSocket(fd) mimics what asyncnet does and lets you pass in your own socket FD. newSocket*(fd) and newAsyncSocket*(fd) now both take "buffered" instead of "isBuff" and defaults to true to match the other constructors on both.
* | | lib/pure/a-c - Dropped 'T' from typespdw2015-06-041-10/+10
|/ /
* | Add warning about recvLineInto being bound to changedef2015-04-261-0/+3
| |
* | Revert "Introduce FutureVar[T] to make recvLineInto safer."def2015-04-261-29/+9
| | | | | | | | This reverts commit 72b4912c84b16644657f94e54105739cba4b2457.
* | Fix asyncdispatch on Windows.Dominik Picheta2015-04-241-112/+0
| |
* | Introduce FutureVar[T] to make recvLineInto safer.Dominik Picheta2015-04-241-9/+29
| | | | | | | | | | | | | | | | | | | | | | FutureVar[T] is a new distinct Future type which is designed to be used for situations where the highest performance is needed. It reduces the number of Future allocations needed. It acts as a replacement for 'var' params in async procs. This commit modifies @def-'s PR in order to make it safer. The recvLineInto procedure has been modified to take a ``FutureVar[string]`` param instead of a ``ptr string`` param.
* | Some small cleanup.Dominik Picheta2015-04-231-2/+2
| |
* | Merge branch 'clean-speedup-2' of https://github.com/def-/Nim into ↵Dominik Picheta2015-04-231-42/+189
|\ \ | |/ |/| | | def--clean-speedup-2
| * Some style cleanupdef2015-03-171-3/+3
| |
| * Move recvInto to asyncnet and don't export itdef2015-03-171-8/+120
| |
| * Don't export readInto* templatesdef2015-03-171-2/+2
| |
| * Make recvLineInto a proc instead of templatedef2015-03-171-50/+48
| |
| * Speed up asynchttpserver significantly using all the previous changesdef2015-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Export socket field of AsyncHttpServer and addHeaders proc for templates - Make respond a template instead of proc because of how often it's called. This means no more "await" when invoking it. - Optimize respond template with special case for empty headers and Content-Length entry - newRequest doesn't allocate a hostname and body anymore because they're copied in later - Major changes to processClient to prevent allocations and copies
| * Make asyncnet usable when avoiding allocations.def2015-03-171-61/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - readInto, readIntoBuf, are templates instead of procs now - New recvLineInto template that reads directly into a string instead of creating a new one. Used by recvLine proc now - Need fd and bufLen fields of AsyncSocketDesc exported because of the templates - recv returns a shallow string to prevent copying - This gives significant speedups, mostly by using templates instead of creating new Futures and waiting for them all the time.
* | Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-1/+1
|/
* Happy new year!Guillaume Gelin2015-01-061-1/+1
|
* Fixes asynchttpsever.Dominik Picheta2014-12-261-0/+4
|
* Fixes #1745.Dominik Picheta2014-12-261-10/+25
|
* Fixes SSL AsyncSocket close problem. Ref #1769. Ref #1759.Dominik Picheta2014-12-241-3/+3
|
* Fix some deprecation warnings caused by renamesdef2014-11-131-40/+40
|
* Implement SO_REUSEADDR for asyncnet and asynchttpserver.Dominik Picheta2014-11-071-0/+13
|
* Fixes asyncnet example.Dominik Picheta2014-09-181-1/+2
|
* Adds socket creation for arbitrary domain, type and protocol.Dominik Picheta2014-09-181-0/+4
|
* Add bool to determine if socket has been closed.Dominik Picheta2014-09-161-1/+3
|
* Lots of documentation improvements for asyncdispatch.Dominik Picheta2014-09-121-4/+14
| | | | Ref #1487.
* Fixes httpclient SSL issue. Implements unbuffered SSL recv. Ref #1487.Dominik Picheta2014-09-061-21/+33
|
* Fixes asynchttpserver.Dominik Picheta2014-09-011-2/+2
|
* Async SSL support.Dominik Picheta2014-08-311-18/+156
|
* Case fixes for network modules.Dominik Picheta2014-08-301-15/+15
|
* Nimrod renamed to NimAraq2014-08-281-1/+1
|
* big renameAraq2014-08-271-6/+8
|
* Fix asyncnet example. Rearrange net code.Dominik Picheta2014-08-101-2/+2
|
* Added SafeDisconn for accept.Dominik Picheta2014-08-101-4/+5
|
* Fixes incorrect async exception handling. Adds sleepAsync.Dominik Picheta2014-08-091-2/+2
| | | | | | | | | | | | | | The tasyncexceptions test has been added which tests for this incorrect exception handling behaviour. The problem was that the exception was raised inside a callback which was called from a previously finished async procedure. This caused a "Future already finished" error. The fix was to simply reraise the exception if the retFutureSym is already finished. sleepAsync was added to help with the reproduction of this test. It should also be useful for users however. Finally some debug information was added to futures to help with future bugs.
* Implement safe flags for socket operations.Dominik Picheta2014-07-131-17/+20
|
* Fix broken async tests.Dominik Picheta2014-07-131-1/+1
|
* Many async optimisations.Dominik Picheta2014-07-121-22/+52
| | | | | | | | | * Selectors implementation will now attempt to immediately execute an IO operation instead of waiting for a ready notification. * Removed recursion in asynchttpserver. * Improved buffered implementation of recvLine in asyncnet. * Optimised ``respond`` in asynchttpserver removing a possible "Delayed ACK" situation.
* Rename asyncdispatch.close to asyncdispatch.closeSocket.Dominik Picheta2014-05-231-1/+1
|