Commit graph

139 commits

Author SHA1 Message Date
Yuriy Glukhov
b2323de914 Fixed compilation error when Sockaddr_in4 or Sockaddr_in6 passed to fromSockAddr 2018-06-07 21:10:00 +03:00
cheatfate
2902308a05 Fix one more place. 2018-06-07 13:06:06 +03:00
cheatfate
46a6fa53a9 Fix fromSockAddrAux() to handle IPv6 addresses properly. 2018-06-07 12:33:29 +03:00
Andreas Rumpf
e67eddc91b
Merge pull request #7822 from data-man/fix_2753
Fixes #2753
2018-06-07 10:40:50 +02:00
WhiteDuke
b36c499907
Set domain to client 2018-05-27 21:08:37 +02:00
data-man
5e8faaf710 Fixes #2753 2018-05-14 19:13:11 +03:00
Mathias Stearn
9048bcc54b Add connectUnix and bindUnix to net docs
fixes #7715
2018-05-09 17:42:16 +02:00
Araq
bbb0fd4eb7 remove deprecated stuff from the stdlib; introduce better deprecation warnings 2018-05-05 21:45:07 +02:00
David Krause
78e946c450 fixed high level sendTo for sending to udp6 (#7630) 2018-05-02 22:44:08 +01:00
Jacek Sieka
72dfe176f5 remove dead code elimination option (#7669) 2018-04-23 11:02:38 +02:00
Dominik Picheta
39c71d6211
Merge pull request #7336 from yglukhov/ipaddr-sockaddr-conversions
Conversion procs for (IpAddress, Port) <-> (SockAddr, Socklen)
2018-04-02 14:31:05 +01:00
Graham Fawcett
ace96bf83e net.connect (with timeout), raise error on connect failure
Under Linux (probably POSIX), the current code tests for timeout, but
does not test for connection failure. connectAsync() returns succesfully
upon an EINPROGRESS result; but at this point, the connection state is
still unknown. After selectWrite() is done, we need to test the socket
for errors again.
2018-03-28 19:09:16 -04:00
Yuriy Glukhov
0770844285 Comments addressed 2018-03-24 22:55:06 +02:00
Yuriy Glukhov
b52de1fcee More flexible fromSockAddr interface 2018-03-15 17:39:09 +02:00
Yuriy Glukhov
1bd0efb067 Fixed crash/interface. Added tests. 2018-03-15 15:49:41 +02:00
Yuriy Glukhov
29bb10b185 Convertion procs for (IpAddress, Port) <-> (SockAddr, Socklen) 2018-03-14 23:14:31 +02:00
Dominik Picheta
1975998c56 Detect openssl related to outdated openssl and help user solve issue. 2018-02-25 13:34:32 +00:00
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