Commit graph

222 commits

Author SHA1 Message Date
Dominik Picheta
63bc046ddf Fixes #7227. 2018-02-17 19:36:06 +00:00
Dominik Picheta
1a2351f95f Fixes #4995. (#7157) 2018-02-13 11:08:37 +01:00
Dominik Picheta
47d05b3f2e Merge branch 'devel' into async-improvements 2018-01-17 16:28:00 +00:00
Dominik Picheta
1661062ebf Raise assertion error when attempting to use closed socket. 2018-01-15 17:48:32 +00:00
Dominik Picheta
4181e1940d recv with a timeout of -1 shouldn't wait on all data. 2018-01-11 20:46:44 +00:00
Dominik Picheta
1256f211f5
Merge pull request #6922 from FedericoCeratto/openssl-1.1.0
Add OpenSSL 1.1.0 support
2018-01-10 23:05:42 +00:00
Andreas Rumpf
08af53032b net.nim: minor documentation update 2018-01-07 12:20:00 +01:00
Federico Ceratto
a78d7a31f7 Add OpenSSL 1.1.0 support #5000
Add a simple online test
2017-12-28 21:57:43 +00:00
Andreas Rumpf
5e43e0d789
Merge branch 'devel' into async-improvements 2017-12-11 15:12:45 +01:00
Federico Ceratto
83de3a85e7 Add TCP_NODELAY support #6795 2017-11-24 23:01:18 +00:00
Dominik Picheta
e5a27c96fb Implements nativesockets.accept. 2017-11-24 16:29:34 +00:00
Dominik Picheta
f221c192b3
Fix creating server example in net module 2017-11-07 17:23:53 +00:00
Yuriy Glukhov
d7b96f478b Fixed crash in case of ssl error in SSLShutdown (#6662) 2017-11-01 10:16:44 +01:00
Arne Döring
000b8afd26 Remove expr/stmt (#5857) 2017-07-25 09:28:23 +02:00
Ruslan Mustakov
e0059287bb Add 'hostname' param to wrapConnectedSocket 2017-05-04 16:27:08 +07: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
Andreas Rumpf
159643824b fixes #3847 (#5609) 2017-03-27 09:39:46 +02:00
Andreas Rumpf
76eb20d2d3 deprecated nativesockets.dealloc, use freeAddrInfo instead; fixed stdlib deprecations 2017-01-30 08:50:57 +01:00
Yuriy Glukhov
a80a0972b7 Fixed dynlink with OpenSSL >1.1.0. Added loadLibPattern. 2016-11-30 17:16:54 +02:00
David Krause
5058ae1ba5 fixed typo 2016-11-17 16:47:36 +01:00
Yuriy Glukhov
6690cd15f4 Mark socketError as gcsafe 2016-10-26 20:17:40 +03:00
Dominik Picheta
8a6343b5b6 Fixes #3847. 2016-09-25 13:02:10 +02:00
Dominik Picheta
1fb5dd2477 Fixes #4797. 2016-09-19 19:36:35 +02:00
Dominik Picheta
3ad368f8ca Improvements to httpclient. Refs #4423.
* Adds ability to query HttpCode and compare it with strings.
* Moves HttpMethod to HttpCore module.
* Implements synchronous HttpClient using {.multisync.}.
2016-09-18 18:16:51 +02:00
Andreas Rumpf
6699387c9b make net.nim compile for osx doc2 2016-09-08 15:06:27 +02:00
Dominik Picheta
006207742f Enable SO_NOSIGPIPE for sockets on OS X. 2016-08-16 21:10:55 +02:00
Dominik Picheta
f44486cc85 Fixes #4406. 2016-08-13 23:30:22 +02:00
Andreas Rumpf
60b187513e stdlib and compiler don't use .immediate anymore 2016-07-29 23:51:01 +02:00
Dominik Picheta
f73dd02787 Fix broken asyncnet module. 2016-06-03 14:21:37 +01:00
Dominik Picheta
5390c25b60 Modified #3472 to make its API more idiomatic. 2016-06-03 13:22:18 +01:00
Dominik Picheta
c1706463dc Merge branch 'tls-psk' of https://github.com/zielmicha/nim into zielmicha-tls-psk 2016-06-03 11:52:11 +01:00
Andreas Rumpf
1a88c01f92 documentation build cleaned up 2016-05-31 03:04:45 +02:00
Dominik Picheta
a484e3f8c2 Merge branch 'unix-sockets' of https://github.com/girvo/Nim into girvo-unix-sockets 2016-05-30 09:38:37 +01:00
Josh Girvin
b662d22ad1 Adding nimdoc comments as per PR comments
As per @dom96 code review comments in PR #3488
2016-05-30 16:29:38 +10:00
Andreas Rumpf
380524caa8 Merge pull request #3648 from FedericoCeratto/reuse_port
Add SO_REUSEPORT support
2016-05-29 22:21:56 +02:00
Dominik Picheta
b22305758d Fix deprecation warning in net module. 2016-04-04 21:52:49 +01:00
Dominik Picheta
3ad103b8cc Fixes small mistake in `net` module. 2016-04-04 21:20:29 +01:00
Dominik Picheta
03be03c6e4 Improved asyncnet docs (SSL procs now shown). Deprecated handshake. 2016-04-04 21:00:43 +01:00
Dominik Picheta
8e6f5f20f6 Improve net and ssl module docs. 2016-04-04 20:47:47 +01:00
Peter Cai
3035c2c63a net: disable SSLv3
SSLv3 is no longer secure and has been removed from OpenSSL since 1.0.2.
Disabling this will enable Nim programs to run against OpenSSL 1.0.2.
2016-04-03 15:15:48 +00:00
Josep Sanjuas
5a582a0d9c Define ports as uint16s to fix #3484 2016-03-27 22:56:44 +02:00
Andreas Rumpf
cc925d97f4 the stdlib supports &= in more contexts; refs #3524 2016-03-05 16:13:23 +01:00
Federico Ceratto
d9cb85c2d8 Spellcheck 2016-02-29 11:25:51 +00:00
Andreas Rumpf
73291aa1bc Merge pull request #3781 from rgv151/patch-net-gc-safe
[net/httpclient] make it gc-safe #2692
2016-02-06 15:26:07 +01:00
Andreas Rumpf
ec1abdef97 fixes #3789 2016-01-31 01:32:09 +01:00
Bruce Doan
4a3a9d8ab8 export parseIpAddress proc 2016-01-27 00:07:31 +07:00
Bruce Doan
443ec02a92 make it gc-safe #2692 2016-01-26 23:06:15 +07:00
Hans Raaf
0634486689 Fixed deprecation warnings while Nim compiles.
I just removed unsigned and changed a writeLn() call to writeLine() to
avoid the remaining deprecation warnings.
2016-01-18 18:14:50 +01:00
Federico Ceratto
e174aa1dbc Add SO_REUSEPORT support 2015-12-16 00:42:22 +00:00
Michał Zieliński
da308be2d7 net.nim: add support for Unix sockets 2015-10-28 20:01:48 +01:00