18 lines
579 B
Plaintext
18 lines
579 B
Plaintext
|
\ Gforth 0.7.3 doesn't seem to have these defined.
|
||
|
2 Constant AF_INET
|
||
|
$40 Constant MSG_DONTWAIT
|
||
|
2048 constant SOCK_NONBLOCK
|
||
|
1 constant SOL_SOCKET
|
||
|
2 Constant SO_REUSEADDR
|
||
|
11 constant EAGAIN
|
||
|
|
||
|
\ Just some size definitions for the C structs / values.
|
||
|
sockaddr_in nip constant /sockaddr_in
|
||
|
4 constant /option_value
|
||
|
|
||
|
\ C FFI for functions which aren't defined in unix/socket.fs
|
||
|
c-library socketext
|
||
|
c-function close() close n -- n ( fd -- result )
|
||
|
c-function setsockopt setsockopt n n n a n -- n ( sockfd level optname optval optlen -- r )
|
||
|
end-c-library
|