Warning: This is the manual of the legacy Guile 2.0 series. You may want to read the manual of the current stable series instead.
Next: Cooperative REPL Servers, Previous: Local Inclusion, Up: Read/Load/Eval/Compile [Contents][Index]
The procedures in this section are provided by
(use-modules (system repl server))
When an application is written in Guile, it is often convenient to allow the user to be able to interact with it by evaluating Scheme expressions in a REPL.
The procedures of this module allow you to spawn a REPL server, which permits interaction over a local or TCP connection. Guile itself uses them internally to implement the --listen switch, Command-line Options.
Return a stream socket bound to a given address addr and port number port. If the host is given, and addr is not, then the host string is converted to an address. If neither is given, we use the loopback address.
Return a UNIX domain socket, bound to a given path.
Create and run a REPL, making it available over the given
server-socket. If server-socket is not provided, it
defaults to the socket created by calling make-tcp-server-socket
with no arguments.
run-server
runs the server in the current thread, whereas
spawn-server
runs the server in a new thread.
Closes the connection on all running server sockets.
Please note that in the current implementation, the REPL threads are cancelled without unwinding their stacks. If any of them are holding mutexes or are within a critical section, the results are unspecified.