Did you know ... Search Documentation:
PublicShow source
Source prolog_server(?Port, +Options)
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 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, []).

% telnet localhost 4000
Welcome to the SWI-Prolog server on thread 3

1 ?-
- As the connection does not involve a terminal, command history and completion are not provided. Neither are interrupts (Control-C). To terminate the Prolog shell one must enter the command "end_of_file."