-
Notifications
You must be signed in to change notification settings - Fork 4
fs socket
An fs-socket is a unix socket living on the local filesystem. It is bidirectional, so supports the methods of both input and output ports.
Sockets come from three places: sys.fs.connect, the accept method of an fs-listener created by sys.fs.listen, or a call to sys.socket-pair.
x.type -> 'fs-listener
x.to-bool -> true
x.path -> returns the file system path of the listener
x.ready? -> true if there is a connection ready to be accepted
x.accept -> accepts a connection and returns a socket
x.close -> shut down the listener
x.read, x.read-rune, x.peek-rune, x.assert-rune, x.read-line, x.ready?, x.skip, x.skip-while, x.skip-until, x.read-token, x.read-token-while, x.read-token-until, x.read-token-if -> see stream
x.type -> 'socket
x.to-bool -> true
x.path -> file system path the socket is connected to
x.close -> close the socket