Commit Graph

26 Commits

Author SHA1 Message Date
Andreas Rumpf
3308d26581 breaking change: arrays of char do not convert to cstring; ptr to array of char does 2017-10-10 00:17:20 +02:00
Andreas Rumpf
db0d353281 Merge branch 'stringify-array' of https://github.com/krux02/Nim into krux02-stringify-array 2017-10-09 23:46:24 +02:00
wt
92d67262fb Fix getPeerAddr() getPeerAddr(): +sin6_addr (#6410) 2017-09-21 10:22:34 +02:00
Fredrik Høisæther Rasch
c39e202976 Introduce first class support for Android (#5772) 2017-08-06 02:18:15 +02:00
Arne Döring
ddea990a70 removed newString proc again, reverted some unnecesary changes 2017-07-24 23:21:51 +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
Jacek Sieka
ce86b4ad78 Posix from detect (#5697)
* refactor posix.nim
* types move to separate files for platform-specifc and generic
("other')
* consts move to separate files that get autogenerated by detect.nim
* proc's stay where they are for now, though in a second stage might
move as well
* fix missing when
2017-04-12 23:10:54 +02:00
Dominik Picheta
c9c64240d3 Fixes ambiguity introduced by #5390. 2017-04-09 20:27:28 +02:00
Federico Ceratto
dd4d47c671 Add gethostname to nativesockets (#5443) 2017-03-01 09:44:24 +01:00
Araq
8ae05c6555 cleaned up accept-close-race fix #5279 2017-02-07 14:59:46 +01:00
Ruslan Mustakov
7a839d7b02 Move checkCloseError to nativesockets 2017-02-07 16:45:59 +07:00
Ruslan Mustakov
fb8168d338 Fix Windows accept() to fail future instead of raising
Resolves: #5279
2017-02-01 18:18:44 +07:00
Andreas Rumpf
76eb20d2d3 deprecated nativesockets.dealloc, use freeAddrInfo instead; fixed stdlib deprecations 2017-01-30 08:50:57 +01:00
Loris Pederiva
9b0b079634 Fix nativesockets.select() 2017-01-18 09:42:56 +01:00
Ruslan Mustakov
45f76738ee Added 'android4' define support that declares a different gethostbyaddr. Fixes #4376 2016-06-22 20:50:18 +06: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
Andreas Rumpf
380524caa8 Merge pull request #3648 from FedericoCeratto/reuse_port
Add SO_REUSEPORT support
2016-05-29 22:21:56 +02:00
Josep Sanjuas
5a582a0d9c Define ports as uint16s to fix #3484 2016-03-27 22:56:44 +02: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
def
31cc1815d1 Fix nativesockets compilation on OpenBSD and NetBSD 2015-12-23 05:59:29 +01:00
Federico Ceratto
e174aa1dbc Add SO_REUSEPORT support 2015-12-16 00:42:22 +00:00
Yuriy Glukhov
5545d36330 Fixed getAddrInfo on android 2015-12-08 12:30:38 +02:00
Juan Francisco Cantero Hurtado
e0835948bd OpenBSD doesn't support AI_V4MAPPED
Related to #3534
2015-11-23 04:27:20 +01:00
Michał Zieliński
da308be2d7 net.nim: add support for Unix sockets 2015-10-28 20:01:48 +01:00
Aman Gupta
eea8d604d0 Merge remote-tracking branch 'origin/devel' into fix-test-failures 2015-10-06 11:06:41 -07:00
Adam Strzelecki
be991ed413 Rename rawsockets module to nativesockets
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.
2015-10-03 19:45:41 +02:00