Implementation of a Curry Port Name Server based on raw sockets.
It is used to implement the library Network.NamedPorts
and
the library Ports
for distributed programming with ports.
Author: Michael Hanus
Version: March 2021
cpnsStart
:: IO ()
Starts the "Curry Port Name Server" (CPNS) running on the local machine. |
cpnsStatus
:: IO ()
Shows all registered ports at the local CPNS demon (in its logfile). |
cpnsStop
:: IO ()
Terminates the local CPNS demon |
registerPort
:: String -> Int -> Int -> IO ()
Registers a symbolic port at the local host. |
getPortInfo
:: String -> String -> IO (Int,Int)
Gets the information about a symbolic port (first argument) at some host (second argument). |
unregisterPort
:: String -> IO ()
Unregisters a symbolic port at the local host. |
cpnsAlive
:: String -> IO Bool
Tests whether the CPNS demon at a host is alive, i.e., reacts on Ping
message.
|
Starts the "Curry Port Name Server" (CPNS) running on the local machine. The CPNS is responsible to resolve symbolic names for ports into physical socket numbers so that a port can be reached under its symbolic name from any machine in the world. |
Shows all registered ports at the local CPNS demon (in its logfile). |
Terminates the local CPNS demon |
Registers a symbolic port at the local host. The symbolic name, the socket number, and the port number are passed as arguments. |
Gets the information about a symbolic port (first argument)
at some host (second argument).
If there is no registration, |
Unregisters a symbolic port at the local host. |
Tests whether the CPNS demon at a host is alive, i.e.,
reacts on |