Module trap
- An asynchronous network messaging system for occam-pi
An asynchronous network messaging system for occam-pi.
The Trap nameserver trapns
must be running in order for Trap programs to find each other. By default, it will assume the nameserver is running on localhost
; to specify where it really is, create a file called .trap.ns
in the current directory containing the hostname.
Index
- Protocol
DATA.IN
- Channel type
OUTBOUND
- Record
PACKET.HEADER
-
Channel type
TRAP.CHANNEL.CT
- Interface for a listening Trap port-
Variable
msg?
- Messages received from the port
-
Variable
-
Channel type
TRAP.CT
- Handle to the Trap server - Record
TRAP.NS.PACKET
-
Protocol
TRAP.REQ
-
Tag
open
- Replies
-
Tag
- Protocol
TRAP.RESP
- Process
main
- Process
trap.bind.socket
-
Process
trap.open
- Open a Trap port -
Process
trap.send
- Send data to a Trap port - Process
trap.server
-
Process
trap.start
- Start the Trap server
Declarations
trap.inc
:34Record TRAP.NS.PACKET
DATA TYPE TRAP.NS.PACKET
trap.inc
:43Channel type TRAP.CHANNEL.CT
CHAN TYPE TRAP.CHANNEL.CT
Interface for a listening Trap port.
trap.inc
:45Variable msg?
CHAN MOBILE []BYTE
Messages received from the port.
trap.inc
:56Protocol TRAP.RESP
PROTOCOL TRAP.RESP
trap.inc
:62Channel type TRAP.CT
CHAN TYPE TRAP.CT
Handle to the Trap server.
trap.occ
:30Record PACKET.HEADER
DATA TYPE PACKET.HEADER
trap.occ
:36Protocol DATA.IN
PROTOCOL DATA.IN IS PACKET.HEADER; MOBILE []BYTE:
trap.occ
:38Channel type OUTBOUND
CHAN TYPE OUTBOUND
trap.occ
:59Process trap.bind.socket
PROC trap.bind.socket (SOCKET listen)
trap.occ
:73Process trap.server
PROC trap.server (VAL INT node, TRAP.CT? svr)
trap.occ
:464Process trap.start
PROC trap.start (VAL INT node, RESULT SHARED TRAP.CT! control)
Start the Trap server.
trap.occ
:473Process trap.open
PROC trap.open (SHARED TRAP.CT! trap, VAL INT port, RESULT TRAP.CHANNEL.CT? chan)
Open a Trap port.
trap.occ
:483Process trap.send
PROC trap.send (SHARED TRAP.CT! trap, VAL INT node, port, MOBILE []BYTE data)
Send data to a Trap port.
trapns.occ
:49Process main
PROC main (SHARED CHAN BYTE out!)