Up: custom-ports   [Index]


1.9.1 Port pairs

Port pairs are Scheme ports connected together so that data written to one port is read from the other port.

Forking a Vicare process does not allow the use of port pairs to communicate between processes; it is rather possible to use port pairs to communicate among coroutines, (vicare-scheme)Running coroutines. To communicate between processes we have to use the POSIX library and create pipes (see pipe) or socket pairs (see socketpair).

The following bindings are exported by the library (vicare language-extensions custom-ports).

Function: open-binary-input-port-pair

Return two values being binary ports: input the first, output the second. Such ports are connected together so that data written to the output port is read from the input port.

Function: open-binary-output-port-pair

Return two values being binary ports: output the first, input the second. Such ports are connected together so that data written to the output port is read from the input port.

Function: open-binary-input/output-port-pair

Return two values being binary ports: input/output the first, input/output the second. Such ports are connected together so that data written to one port is read from the other port.

Function: open-textual-input-port-pair

Return two values being textual ports: input the first, output the second. Such ports are connected together so that data written to the output port is read from the input port.

Function: open-textual-output-port-pair

Return two values being textual ports: output the first, input the second. Such ports are connected together so that data written to the output port is read from the input port.

Function: open-textual-input/output-port-pair

Return two values being textual ports: input/output the first, input/output the second. Such ports are connected together so that data written to one port is read from the other port.


Up: custom-ports   [Index]