socketpCompiler
If obj is a socket returns t, otherwise ().
make-listenerCompiler Allocates a fresh listener object.
make-socketCompiler Allocates a fresh socket object. Note that this function is almost never called.
listener-idCompiler
Returns a pair, whose car field contains a symbol naming the local
host and whose cdr field is a port number on that host identified with
the listener.
listenCompiler
Listens on the port number returned by listener-id applied to
listener and returns socket when a connection is
established.
connectCompiler
The pair contains the information returned by listener-id and
makes a connection to the named machine on the specified port,
returning socket which is the handle on the established
connection bewteen the two processes.
close-listenerCompiler
Changes internal state of listener so that it can no longer be
used for listening.
close-socketCompiler
Flushes all pending data related to socket and changes the
internal state of socket so that it is no longer readable or
writable.
socket-readable-pCompiler
If there is data available for reading from socket, returns t, otherwise ().
socket-writable-pCompiler
If data can be written to socket, returns t, otherwise
().
Figure is two scripts of a simple example of
establishing a socket connection and a dialogue across the connection
Currently socket-read and socket-write are used for input and output. If you are comminicating with non-processes then you should use format/print and scan/input. Read, for various reasons cannot be used.
|