summary refs log tree commit diff stats
path: root/lib/posix
diff options
context:
space:
mode:
authorJaremy Creechley <creechley@gmail.com>2021-12-12 13:39:56 -0800
committerGitHub <noreply@github.com>2021-12-12 21:39:56 +0000
commit4b5cecd902cc4126ff9d6cda9edb78a13a421239 (patch)
treee5c9a8ebd20e642e6b7c0e0be31de4b684b678e3 /lib/posix
parenta3ef5df680e55d9bf68027fcb0ec6358b4279d09 (diff)
downloadNim-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.nim4
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
255e61d1329c3a26'>^
157cd6d8d ^
2ac265696 ^
f4a0400de ^
22a702868 ^
b7c806381 ^
a2bb7d4c7 ^



d4bca58b7 ^
2958adc47 ^

c55f5b34e ^
5f64d7a35 ^
d01ff8994 ^
d01ff8994 ^
22a702868 ^
22a702868 ^


d01ff8994 ^
d01ff8994 ^
22a702868 ^



22a702868 ^

22a702868 ^
258aabba6 ^



9952d1667 ^
258aabba6 ^



22a702868 ^


22a702868 ^







258aabba6 ^


8b5aa221a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73