Description:
Implementation of IO using pipes.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
ReadTimeout | 60 | n seconds or -1 (no timeout) | Timeout on reading | ReadTimeout 45 |
WriteTimout | 60 | n seconds or -1 (no timeout) | Timeout on writing | WriteTimeout 45 |
NoYield | - | Read|Write | Do not yield to other threads | NoYield="Read" |
Flag | - | Pipe | Specify a flag | Flags="Pipe" |
Returns:
PIAPI_COMPLETED on success.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name PipeIO Class PipeIOClass ReadTimeout 45 WriteTimeout -1 Flag "Pipe" </Object>
:
Description:
Acts as a link in an IO chain and monitors construction and
destruction of IO objects as well as IO transactions.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
IOObject | + | Object name | Lower level IO object | IOObject="TCPIPIOObject" |
OutFile | + | <filename> | An output filename | OutFile="../Logs/snoop.txt" |
Returns:
PIAPI_COMPLETED on success.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name SnoopIO Class SnoopIOClass IOObject DefaultIOObject OutFile "../Logs/snoop.log" </Object>
:
Description:
This object 'fakes' an IO connection by feeding canned data to the
reader. The canned data is read from files.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
AcceptInterval | 0 | 0, -1, n | IO accept interval | AcceptInterval 0 |
SendInterval | 0 | 0, -1, n | IO output interval | SendInterval 0 |
Data | + | <filename> | File data to read | DataFile ./../tests/t2.tst #define KEY_CONF_ERRORAFTER "ErrorAfter" |
HTTPEquiv | + | <variable>: <value> | Variable value pair for DB | HTTPEquiv="RemoteAddr: 127.0.0.1" |
ErrorAfter | + | <number> | Number of child IO objects to error after | ErrorAfter="10000" |
Returns:
PIAPI_COMPLETED on success.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name StubIO Class StubIOClass AcceptInterval 0 SendInterval 0 DataFile ./../tests/t2.tst </Object>
:
Description:
This object encapsulates TCP/IP based IO communication.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Type | Passive | "Passive", "Active" | A Pi3 object | Type "Passive" |
BindPort | + (passive only) | 1..n | local port | BindPort 8080 |
BindHost | + (passive only) | nnn.nnn.nnn.nnn or host.org.dom | local host | BindHost "localhost" |
AcceptTimeout | 360 | n seconds or -1 (infinite) | Timeout on accept | AcceptTimeout -1 |
RecvTimeout | - | n seconds or -1 (infinite) | Timeout on receive | RecvTimeout 45 |
SendTimeout | - | n seconds or -1 (infinite) | Timeout on send | SendTimeout 30 |
PeerAddressVariable | - | <db type>:<name> | Variable to hold Peer IP address | PeerAddressVariable "STRING:RemoteAddr" |
PeerHostNameVariable | - | <db type>:<name> | Variable to hold Peer hostname | PeerHostNameVariable "STRING:RemoteHost" |
LocalAddressVariable | - | <db type>:<name> | Variable to hold local IP address | LocalAddressVariable "STRING:LocalAddr" |
AcceptLockFile | - | <filename> | File containing lock filename | AcceptLockFile "Logs/lockfile.txt" |
Flags | 0 (no flags set) | "OwnDB" | "SetPeerAddress" | "DNSReverseLookup" | Flags which effect operation | Flags "OwnDB|SetPeerAddress|DNSReverseLookup" |
fork()
system call may have been invoked
to spawn a single process with a single listening file descriptor into
multiple processes with multiple copies of the same file descriptor.
Value | Meaning |
---|---|
OwnDB | Each child object will create its own DB |
SetPeerAddress | On creation, each child socket will get the IP address of its remote peer and place it in the DB with the variable name specified with the 'PeerAddressVariable' option. |
DNSReverseLookup | When the IP address of the remote peer is retrieved the hostname of the peer will be found and placed in the DB with the variable name specified by the 'PeerHostNameVariable' option. |
SetLocalAddress | On creation, each child socket will store its local IP address in the variable specified by the 'LocalAddressVariable' parameter. |
Returns:
PIAPI_COMPLETED on success.
PIAPI_CONTINUE if no action taken.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name DefaultTCPIPIOObject Class TCPIPIOClass BindHost localhost BindPort 80 Type Passive AcceptTimeout -1 RecvTimeout 30 SendTimeout 60 PeerAddressVariable "STRING:RemoteAddr" PeerHostNameVariable "STRING:RemoteHost" LocalAddressVariable "STRING:LocalAddr" Flags "OwnDB|SetLocalAddress|SetPeerAddress|DNSReverseLookup" </Object>