chibi-scheme/lib/chibi/net.sld
Alex Shinn 8b5eb68238 File descriptors maintain a reference count of ports open on them
They can be close()d explicitly with close-file-descriptor, and
will close() on gc, but only explicitly closing the last port on
them will close the fileno.  Notably needed for network sockets
where we open separate input and output ports on the same socket.
2014-02-20 22:32:50 +09:00

23 lines
1.1 KiB
Scheme

(define-library (chibi net)
(export sockaddr? address-info? get-address-info make-address-info
socket connect bind accept listen open-socket-pair
sockaddr-name sockaddr-port make-sockaddr
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
address-family/unix address-family/inet address-family/unspecified
socket-type/stream socket-type/datagram socket-type/raw
ip-proto/ip ip-proto/tcp ip-proto/udp
ai/passive ai/canonname ai/numeric-host
get-socket-option set-socket-option! level/socket
socket-opt/debug socket-opt/broadcast socket-opt/reuseaddr
socket-opt/keepalive socket-opt/oobinline socket-opt/sndbuf
socket-opt/rcvbuf socket-opt/dontroute socket-opt/rcvlowat
socket-opt/sndlowat
get-peer-name
;; C structs
sockaddr addrinfo)
(import (chibi) (chibi filesystem))
(include-shared "net")
(include "net.scm"))