next node: ProcessMonitor,
prev node: Subsystem Opal Channel,
up to node: Subsystem Opal Channel


ProcessConnect

This structure provides a bidirectional connection between two OPAL processes.

Signature of ProcessConnect

List of Import References :
See BOOL
See Com
See DENOTATION
See Nat
See Option
See Seq
See Void

SIGNATURE ProcessConnect[inData,outData]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

SORT inData outData

IMPORT  Com[channel]    ONLY    com
        Com[void]       ONLY    com
        Com[bool]       ONLY    com
        Com[inData]     ONLY    com ans:SORT
        Com[option[inData]]
                        ONLY    com
        Void            ONLY    void
        Option[inData]  ONLY    option
        

channel representing a connection between two processes:

SORT channel

open establishes the connection. The SymbolicKey is the name of a nonexistent file in the filesystem (usually a named pipe).

Successful opening is not a guarantee for an existing partner process.

close closes a channel, and removes resource references. Only when both partner processes have closed a channel, the associated resources will be actually freed.

TYPE role      == client server
FUN open       : denotation ** role     -> com[channel]
FUN close      : channel                -> com[void]

incoming? checks if there is an unread data item from partner.

read waits for an incoming data item whereas read? returns immediately either with the read data item or with nil.

	      'read? =^= IF incoming? THEN read ELSE nil FI'

write writes some data into channel.

FUN incoming? : channel                 -> com[bool]
FUN read      : channel                 -> com[inData]
FUN read?     : channel                 -> com[option[inData]]
FUN write     : channel ** outData      -> com[void]


next node: ProcessMonitor,
prev node: Subsystem Opal Channel,
up to node: Subsystem Opal Channel