diff --git a/lib/chibi/net.sld b/lib/chibi/net.sld index 000a9fe7..a1cd1dea 100644 --- a/lib/chibi/net.sld +++ b/lib/chibi/net.sld @@ -1,7 +1,7 @@ (define-library (chibi net) (export sockaddr? address-info? get-address-info make-address-info - socket connect bind accept listen + socket connect bind accept listen open-socket-pair with-net-io open-net-io make-listener-socket address-info-family address-info-socket-type address-info-protocol address-info-address address-info-address-length address-info-next diff --git a/lib/chibi/net.stub b/lib/chibi/net.stub index b5cda7d9..2049765e 100644 --- a/lib/chibi/net.stub +++ b/lib/chibi/net.stub @@ -48,6 +48,12 @@ (define-c int connect (fileno sockaddr int)) +;;> Returns a list of 2 new sockets, the input and output end of a new +;;> pipe, respectively. + +(define-c errno (open-socket-pair "socketpair") + (int int int (result (array fileno 2)))) + (define-c-const int (address-family/unix "AF_UNIX")) (define-c-const int (address-family/inet "AF_INET")) (define-c-const int (socket-type/stream "SOCK_STREAM"))