Adding an interface to socketpair.

This commit is contained in:
Alex Shinn 2013-07-14 14:30:10 +09:00
parent 1bd9a79e71
commit 2f8ef980d6
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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"))