; open a TCP socket
; Input : INCHNL (req) = will return channel of created socket or error
; msg if open fails, PBR
; INMEM ( ? ) = ?? - may be unnecessary, PBR
; INADDR (opt) = IP address of remote server to connect to as a
; client, or null to open as a server; if null,
; and PBR, will return address of client that
; connects
; INPORT (req) = IP port to open (client or server)
; INIP (req) = array of backround proc params, PBR
; also requires INBPN
; Output: void
RECEIVE(INV,INCHNL,INIP,INERR,INMEM)
; read socket
; Input : INV (req) = location to store message, PBR
; INCHNL (req) = socket
; INIP (req) = array of backround proc params, PBR
; INERR (opt) = error array, PBR
; INMEM ( ? ) = ?? - may be unnecessary, PBR
; also requires INBPN,U
; Output: 0=ok, 1=no response, 2=failure during receive, 3=fatal err
; init vars
DEBUG(L)
; set debug params for a BACKGROUND PROCESS
; Input : L (opt) = debug level; "" = look it up (def), 0 = turn it
; off, positive integer = set it
; also expects INBPN
; Output: void
; INDEBUG = Debug Level
; INDEBUGD = Log Location
; if debug level input is null, look it up
LOG(MSG,TYP,ACK)
; log BACKGROUND PROCESS activity and errors
; Input : MSG (req) = status/error/debug message; status msg must be a
; string, error/debug msg can be a string (PBV) or
; an array of strings (PBR)
; TYP (opt) = msg type: S=status(def), E=error, or integer
; corresponding to level of a debug msg
; ACK (opt) = boolean flag; set true only when logging a
; positive ack (sets piece 3 of run node = $H)
; INBPN,U (req)
; INDEBUG,INDEBUGD,INHSRVR (opt)
; Output: void
; INDEBUG,INDEBUGD if not set coming in
; if debug on, will write to debug log (file, device or global)
; Local : ENUM = INTERFACE ERROR ptr
; T = timestamp
; SRVR = server number or 0 if not a multiple background proc