Create a TCP/IP based server on the given Port, so you can
telnet into Prolog and run an interactive session. This library
is intended to provide access for debugging and management of
embedded servers.
Currently defined options are:
- allow(IP)
- Allow access from IP, a term of the format
ip(A,B,C,D)
.
Multiple of such terms can exist and access is granted
if the peer IP address unifies to one of them. If no
allow option is provided access is only granted from
ip(127,0,0,1)
(localhost).
For example:
?- prolog_server(4000, []).
% netcat -N localhost 4000
Welcome to the SWI-Prolog server on thread 3
1 ?-
- See also
- - The add-on
libssh
provides an embedded SSH server. This
provides encryption as well as a pseudo terminal for a better
user experience.
- bug
- - As the connection does not involve a terminal, command
history and completion are not provided. Neither are interrupts
(Control-C). The Prolog shell can be terminated if
netcat
shuts
down the socket on ^D (using the -N
option). Otherwise one must
enter the command "end_of_file."