@@ -353,7 +353,7 @@ fn htonl(hostlong: c_uint) -> c_uint:
353
353
```
354
354
355
355
#### Notes:
356
- * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html.
356
+ * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html .
357
357
"""
358
358
return external_call[" htonl" , c_uint, c_uint](hostlong)
359
359
@@ -373,7 +373,7 @@ fn htons(hostshort: c_ushort) -> c_ushort:
373
373
```
374
374
375
375
#### Notes:
376
- * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html.
376
+ * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html .
377
377
"""
378
378
return external_call[" htons" , c_ushort, c_ushort](hostshort)
379
379
@@ -393,7 +393,7 @@ fn ntohl(netlong: c_uint) -> c_uint:
393
393
```
394
394
395
395
#### Notes:
396
- * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html
396
+ * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html .
397
397
"""
398
398
return external_call[" ntohl" , c_uint, c_uint](netlong)
399
399
@@ -413,7 +413,7 @@ fn ntohs(netshort: c_ushort) -> c_ushort:
413
413
```
414
414
415
415
#### Notes:
416
- * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html
416
+ * Reference: https://man7.org/linux/man-pages/man3/htonl.3p.html .
417
417
"""
418
418
return external_call[" ntohs" , c_ushort, c_ushort](netshort)
419
419
@@ -441,7 +441,7 @@ fn _inet_ntop(
441
441
```
442
442
443
443
#### Notes:
444
- * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html.
444
+ * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html .
445
445
"""
446
446
return external_call[
447
447
" inet_ntop" ,
@@ -479,7 +479,7 @@ fn inet_ntop[
479
479
```
480
480
481
481
#### Notes:
482
- * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html.
482
+ * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html .
483
483
"""
484
484
constrained[
485
485
Int(address_family) in [AF_INET , AF_INET6 ], " Address family must be either INET_ADDRSTRLEN or INET6_ADDRSTRLEN."
@@ -537,7 +537,7 @@ fn _inet_pton(af: c_int, src: UnsafePointer[c_char], dst: UnsafePointer[c_void])
537
537
```
538
538
539
539
#### Notes:
540
- * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html
540
+ * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html .
541
541
"""
542
542
return external_call[
543
543
" inet_pton" ,
@@ -570,7 +570,7 @@ fn inet_pton[address_family: Int32](src: UnsafePointer[c_char]) raises -> c_uint
570
570
```
571
571
572
572
#### Notes:
573
- * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html
573
+ * Reference: https://man7.org/linux/man-pages/man3/inet_ntop.3p.html .
574
574
* This function is valid for `AF_INET` and `AF_INET6`.
575
575
"""
576
576
constrained[Int(address_family) in [AF_INET , AF_INET6 ], " Address family must be either AF_INET or AF_INET6." ]()
@@ -609,7 +609,7 @@ fn _socket(domain: c_int, type: c_int, protocol: c_int) -> c_int:
609
609
```
610
610
611
611
#### Notes:
612
- * Reference: https://man7.org/linux/man-pages/man3/socket.3p.html
612
+ * Reference: https://man7.org/linux/man-pages/man3/socket.3p.html .
613
613
"""
614
614
return external_call[" socket" , c_int, c_int, c_int, c_int](domain, type , protocol)
615
615
@@ -641,7 +641,7 @@ fn socket(domain: c_int, type: c_int, protocol: c_int) raises -> c_int:
641
641
```
642
642
643
643
#### Notes:
644
- * Reference: https://man7.org/linux/man-pages/man3/socket.3p.html
644
+ * Reference: https://man7.org/linux/man-pages/man3/socket.3p.html .
645
645
"""
646
646
var fd = _socket(domain, type , protocol)
647
647
if fd == - 1 :
@@ -707,7 +707,7 @@ fn _setsockopt[
707
707
```
708
708
709
709
#### Notes:
710
- * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html
710
+ * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html .
711
711
"""
712
712
return external_call[
713
713
" setsockopt" ,
@@ -748,7 +748,7 @@ fn setsockopt(
748
748
```
749
749
750
750
#### Notes:
751
- * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html
751
+ * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html .
752
752
"""
753
753
var result = _setsockopt(socket, level, option_name, Pointer.address_of(option_value), sizeof[Int]())
754
754
if result == - 1 :
@@ -796,7 +796,7 @@ fn _getsockopt[
796
796
```
797
797
798
798
#### Notes:
799
- * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html
799
+ * Reference: https://man7.org/linux/man-pages/man3/setsockopt.3p.html .
800
800
"""
801
801
return external_call[
802
802
" getsockopt" ,
@@ -838,7 +838,7 @@ fn getsockopt(
838
838
```
839
839
840
840
#### Notes:
841
- * Reference: https://man7.org/linux/man-pages/man3/getsockopt.3p.html
841
+ * Reference: https://man7.org/linux/man-pages/man3/getsockopt.3p.html .
842
842
"""
843
843
var option_value = stack_allocation[1 , c_void]()
844
844
var option_len : socklen_t = sizeof[Int]()
@@ -882,7 +882,7 @@ fn _getsockname[
882
882
```
883
883
884
884
#### Notes:
885
- * Reference: https://man7.org/linux/man-pages/man3/getsockname.3p.html
885
+ * Reference: https://man7.org/linux/man-pages/man3/getsockname.3p.html .
886
886
"""
887
887
return external_call[
888
888
" getsockname" ,
@@ -917,7 +917,7 @@ fn getsockname[
917
917
```
918
918
919
919
#### Notes:
920
- * Reference: https://man7.org/linux/man-pages/man3/getsockname.3p.html
920
+ * Reference: https://man7.org/linux/man-pages/man3/getsockname.3p.html .
921
921
"""
922
922
var result = _getsockname(socket, address, address_len)
923
923
if result == - 1 :
@@ -957,7 +957,7 @@ fn _getpeername[
957
957
```
958
958
959
959
#### Notes:
960
- * Reference: https://man7.org/linux/man-pages/man2/getpeername.2.html
960
+ * Reference: https://man7.org/linux/man-pages/man2/getpeername.2.html .
961
961
"""
962
962
return external_call[
963
963
" getpeername" ,
@@ -989,7 +989,7 @@ fn getpeername(file_descriptor: c_int) raises -> sockaddr_in:
989
989
```
990
990
991
991
#### Notes:
992
- * Reference: https://man7.org/linux/man-pages/man2/getpeername.2.html
992
+ * Reference: https://man7.org/linux/man-pages/man2/getpeername.2.html .
993
993
"""
994
994
var remote_address = stack_allocation[1 , sockaddr]()
995
995
var result = _getpeername(file_descriptor, remote_address, Pointer.address_of(socklen_t(sizeof[sockaddr]())))
@@ -1033,7 +1033,7 @@ fn _bind[origin: MutableOrigin](socket: c_int, address: Pointer[sockaddr_in, ori
1033
1033
```
1034
1034
1035
1035
#### Notes:
1036
- * Reference: https://man7.org/linux/man-pages/man3/bind.3p.html
1036
+ * Reference: https://man7.org/linux/man-pages/man3/bind.3p.html .
1037
1037
"""
1038
1038
return external_call[" bind" , c_int, c_int, Pointer[sockaddr_in, origin], socklen_t](socket, address, address_len)
1039
1039
@@ -1071,7 +1071,7 @@ fn bind(socket: c_int, mut address: sockaddr_in) raises:
1071
1071
```
1072
1072
1073
1073
#### Notes:
1074
- * Reference: https://man7.org/linux/man-pages/man3/bind.3p.html
1074
+ * Reference: https://man7.org/linux/man-pages/man3/bind.3p.html .
1075
1075
"""
1076
1076
var result = _bind(socket, Pointer.address_of(address), sizeof[sockaddr_in]())
1077
1077
if result == - 1 :
@@ -1129,7 +1129,7 @@ fn _listen(socket: c_int, backlog: c_int) -> c_int:
1129
1129
```
1130
1130
1131
1131
#### Notes:
1132
- * Reference: https://man7.org/linux/man-pages/man3/listen.3p.html
1132
+ * Reference: https://man7.org/linux/man-pages/man3/listen.3p.html .
1133
1133
"""
1134
1134
return external_call[" listen" , c_int, c_int, c_int](socket, backlog)
1135
1135
@@ -1154,7 +1154,7 @@ fn listen(socket: c_int, backlog: c_int) raises:
1154
1154
```
1155
1155
1156
1156
#### Notes:
1157
- * Reference: https://man7.org/linux/man-pages/man3/listen.3p.html
1157
+ * Reference: https://man7.org/linux/man-pages/man3/listen.3p.html .
1158
1158
"""
1159
1159
var result = _listen(socket, backlog)
1160
1160
if result == - 1 :
@@ -1190,7 +1190,7 @@ fn _accept[
1190
1190
```
1191
1191
1192
1192
#### Notes:
1193
- * Reference: https://man7.org/linux/man-pages/man3/accept.3p.html
1193
+ * Reference: https://man7.org/linux/man-pages/man3/accept.3p.html .
1194
1194
"""
1195
1195
return external_call[
1196
1196
" accept" , c_int, c_int, Pointer[sockaddr, address_origin], Pointer[socklen_t, len_origin] # FnName, RetType
@@ -1227,7 +1227,7 @@ fn accept(socket: c_int) raises -> c_int:
1227
1227
```
1228
1228
1229
1229
#### Notes:
1230
- * Reference: https://man7.org/linux/man-pages/man3/accept.3p.html
1230
+ * Reference: https://man7.org/linux/man-pages/man3/accept.3p.html .
1231
1231
"""
1232
1232
var remote_address = sockaddr()
1233
1233
var result = _accept(socket, Pointer.address_of(remote_address), Pointer.address_of(socklen_t(sizeof[socklen_t]())))
@@ -1293,7 +1293,7 @@ fn _connect[origin: Origin](socket: c_int, address: Pointer[sockaddr_in, origin]
1293
1293
```
1294
1294
1295
1295
#### Notes:
1296
- * Reference: https://man7.org/linux/man-pages/man3/connect.3p.html
1296
+ * Reference: https://man7.org/linux/man-pages/man3/connect.3p.html .
1297
1297
"""
1298
1298
return external_call[" connect" , c_int](socket, address, address_len)
1299
1299
@@ -1328,7 +1328,7 @@ fn connect(socket: c_int, address: sockaddr_in) raises:
1328
1328
```
1329
1329
1330
1330
#### Notes:
1331
- * Reference: https://man7.org/linux/man-pages/man3/connect.3p.html
1331
+ * Reference: https://man7.org/linux/man-pages/man3/connect.3p.html .
1332
1332
"""
1333
1333
var result = _connect(socket, Pointer.address_of(address), sizeof[sockaddr_in]())
1334
1334
if result == - 1 :
@@ -1402,7 +1402,7 @@ fn _recv(
1402
1402
```
1403
1403
1404
1404
#### Notes:
1405
- * Reference: https://man7.org/linux/man-pages/man3/recv.3p.html
1405
+ * Reference: https://man7.org/linux/man-pages/man3/recv.3p.html .
1406
1406
"""
1407
1407
return external_call[
1408
1408
" recv" ,
@@ -1437,7 +1437,7 @@ fn recv(
1437
1437
```
1438
1438
1439
1439
#### Notes:
1440
- * Reference: https://man7.org/linux/man-pages/man3/recv.3p.html
1440
+ * Reference: https://man7.org/linux/man-pages/man3/recv.3p.html .
1441
1441
"""
1442
1442
var result = _recv(socket, buffer, length, flags)
1443
1443
if result == - 1 :
@@ -1504,7 +1504,7 @@ fn _recvfrom[
1504
1504
```
1505
1505
1506
1506
#### Notes:
1507
- * Reference: https://man7.org/linux/man-pages/man3/recvfrom.3p.html
1507
+ * Reference: https://man7.org/linux/man-pages/man3/recvfrom.3p.html .
1508
1508
* Valid Flags:
1509
1509
* `MSG_PEEK`: Peeks at an incoming message. The data is treated as unread and the next recvfrom() or similar function shall still return this data.
1510
1510
* `MSG_OOB`: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific.
@@ -1550,7 +1550,7 @@ fn recvfrom(
1550
1550
```
1551
1551
1552
1552
#### Notes:
1553
- * Reference: https://man7.org/linux/man-pages/man3/recvfrom.3p.html
1553
+ * Reference: https://man7.org/linux/man-pages/man3/recvfrom.3p.html .
1554
1554
* Valid Flags:
1555
1555
* `MSG_PEEK`: Peeks at an incoming message. The data is treated as unread and the next recvfrom() or similar function shall still return this data.
1556
1556
* `MSG_OOB`: Requests out-of-band data. The significance and semantics of out-of-band data are protocol-specific.
@@ -1610,7 +1610,7 @@ fn _send(socket: c_int, buffer: UnsafePointer[c_void], length: c_size_t, flags:
1610
1610
```
1611
1611
1612
1612
#### Notes:
1613
- * Reference: https://man7.org/linux/man-pages/man3/send.3p.html
1613
+ * Reference: https://man7.org/linux/man-pages/man3/send.3p.html .
1614
1614
"""
1615
1615
return external_call[" send" , c_ssize_t](socket, buffer, length, flags)
1616
1616
@@ -1652,7 +1652,7 @@ fn send(socket: c_int, buffer: UnsafePointer[c_void], length: c_size_t, flags: c
1652
1652
```
1653
1653
1654
1654
#### Notes:
1655
- * Reference: https://man7.org/linux/man-pages/man3/send.3p.html
1655
+ * Reference: https://man7.org/linux/man-pages/man3/send.3p.html .
1656
1656
"""
1657
1657
var result = _send(socket, buffer, length, flags)
1658
1658
if result == - 1 :
@@ -1746,7 +1746,7 @@ fn _sendto(
1746
1746
```
1747
1747
1748
1748
#### Notes:
1749
- * Reference: https://man7.org/linux/man-pages/man3/sendto.3p.html
1749
+ * Reference: https://man7.org/linux/man-pages/man3/sendto.3p.html .
1750
1750
* Valid Flags:
1751
1751
* `MSG_EOR`: Terminates a record (if supported by the protocol).
1752
1752
* `MSG_OOB`: Sends out-of-band data on sockets that support out-of-band data. The significance and semantics of out-of-band data are protocol-specific.
@@ -1804,7 +1804,7 @@ fn sendto(
1804
1804
```
1805
1805
1806
1806
#### Notes:
1807
- * Reference: https://man7.org/linux/man-pages/man3/sendto.3p.html
1807
+ * Reference: https://man7.org/linux/man-pages/man3/sendto.3p.html .
1808
1808
* Valid Flags:
1809
1809
* `MSG_EOR`: Terminates a record (if supported by the protocol).
1810
1810
* `MSG_OOB`: Sends out-of-band data on sockets that support out-of-band data. The significance and semantics of out-of-band data are protocol-specific.
@@ -1880,7 +1880,7 @@ fn _shutdown(socket: c_int, how: c_int) -> c_int:
1880
1880
```
1881
1881
1882
1882
#### Notes:
1883
- * Reference: https://man7.org/linux/man-pages/man3/shutdown.3p.html
1883
+ * Reference: https://man7.org/linux/man-pages/man3/shutdown.3p.html .
1884
1884
"""
1885
1885
return external_call[" shutdown" , c_int, c_int, c_int](socket, how)
1886
1886
@@ -1911,7 +1911,7 @@ fn shutdown(socket: c_int, how: c_int) raises:
1911
1911
```
1912
1912
1913
1913
#### Notes:
1914
- * Reference: https://man7.org/linux/man-pages/man3/shutdown.3p.html
1914
+ * Reference: https://man7.org/linux/man-pages/man3/shutdown.3p.html .
1915
1915
"""
1916
1916
var result = _shutdown(socket, how)
1917
1917
if result == - 1 :
@@ -1946,7 +1946,7 @@ fn gai_strerror(ecode: c_int) -> UnsafePointer[c_char]:
1946
1946
```
1947
1947
1948
1948
#### Notes:
1949
- * Reference: https://man7.org/linux/man-pages/man3/gai_strerror.3p.html
1949
+ * Reference: https://man7.org/linux/man-pages/man3/gai_strerror.3p.html .
1950
1950
"""
1951
1951
return external_call[" gai_strerror" , UnsafePointer[c_char], c_int](ecode)
1952
1952
@@ -1973,7 +1973,7 @@ fn _close(fildes: c_int) -> c_int:
1973
1973
```
1974
1974
1975
1975
#### Notes:
1976
- * Reference: https://man7.org/linux/man-pages/man3/close.3p.html
1976
+ * Reference: https://man7.org/linux/man-pages/man3/close.3p.html .
1977
1977
"""
1978
1978
return external_call[" close" , c_int, c_int](fildes)
1979
1979
@@ -2006,7 +2006,7 @@ fn close(file_descriptor: c_int) raises:
2006
2006
```
2007
2007
2008
2008
#### Notes:
2009
- * Reference: https://man7.org/linux/man-pages/man3/close.3p.html
2009
+ * Reference: https://man7.org/linux/man-pages/man3/close.3p.html .
2010
2010
"""
2011
2011
if _close(file_descriptor) == - 1 :
2012
2012
var errno = get_errno()
0 commit comments