diff options
author | Jaremy Creechley <creechley@gmail.com> | 2021-12-12 13:39:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-12 21:39:56 +0000 |
commit | 4b5cecd902cc4126ff9d6cda9edb78a13a421239 (patch) | |
tree | e5c9a8ebd20e642e6b7c0e0be31de4b684b678e3 /lib/posix | |
parent | a3ef5df680e55d9bf68027fcb0ec6358b4279d09 (diff) | |
download | Nim-4b5cecd902cc4126ff9d6cda9edb78a13a421239.tar.gz |
Various std net improvements (#19132)
* Variant of that works with raw IpAddresses. - Add doc tests for new net proc's. - Aadd recvFrom impl - Add recvFrom impl -- tweak handling data var - Update lib/pure/net.nim Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> - cleaning up sendTo args - remove extra connect test - cleaning up sendTo args - fix inet_ntop test - fix test failing - byte len * fix test failing - byte len * debugging odd windows build failure * debugging odd windows build failure * more experiments to figure out the windows failure * try manual assigment on InAddr Co-authored-by: Jaremy Creechley <jaremy.creechley@panthalassa.com>
Diffstat (limited to 'lib/posix')
-rw-r--r-- | lib/posix/posix.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/posix/posix.nim b/lib/posix/posix.nim index c2504f994..57dd6e2c7 100644 --- a/lib/posix/posix.nim +++ b/lib/posix/posix.nim @@ -155,9 +155,9 @@ when not defined(zephyr): proc inet_addr*(a1: cstring): InAddrT {.importc, header: "<arpa/inet.h>".} proc inet_ntoa*(a1: InAddr): cstring {.importc, header: "<arpa/inet.h>".} -proc inet_ntop*(a1: cint, a2: pointer, a3: cstring, a4: int32): cstring {. +proc inet_ntop*(a1: cint, a2: pointer | ptr InAddr | ptr In6Addr, a3: cstring, a4: int32): cstring {. importc:"(char *)$1", header: "<arpa/inet.h>".} -proc inet_pton*(a1: cint, a2: cstring, a3: pointer): cint {. +proc inet_pton*(a1: cint, a2: cstring, a3: pointer | ptr InAddr | ptr In6Addr): cint {. importc, header: "<arpa/inet.h>".} var |