Macaulay2 » Documentation
Packages » SCSCP :: startServer
next | previous | forward | backward | up | index | toc

startServer -- Start an SCSCP server



The server will keep running indefinitely; it may be stopped by sending a Ctrl-C. Furthermore, the server forks for every new incoming connection, so that it can serve many clients simultaneously. The amount of output printed to the screen is determined by the value of debugLevel.
i1 : debugLevel = 2;
i2 : startServer(26137)
[SCSCP][Server] Listening on :26137
[SCSCP][Server] Waiting for incoming connection 
[SCSCP][Server] Incoming connection. Forking. 
[SCSCP][handleIncoming 1] Handling new connection
[SCSCP][handleIncoming 1] Sending announcement
[SCSCP][handleIncoming 1] Waiting for version request...
[SCSCP][handleIncoming 1] Great! Compatible version: '1.3'
[SCSCP][Server] Waiting for incoming connection 
[SCSCP][handleIncoming 1] 'start' received
[SCSCP][handleProcedureCall 1] Evaluating procedure call...
[SCSCP][handleProcedureCall 1] Returning response...
[SCSCP][handleIncoming 1]  atEndOFFile
[SCSCP][Server] Child 1 terminated

Ways to use startServer :

For the programmer

The object startServer is a method function.