tcp Service
TCP capability acquired through a declared System Service.
Contract tcp · 1.0.0-draft.1
Functions
getRequestProtocol
Protocol selected by lookup parameters.
No Arguments
Returns: tcp.Protocol
send
Response Message, or null for asynchronous submission.
| Argument | Type | Required | Default |
|---|---|---|---|
| message | tcp.Message | Yes | — |
| asynchronous | core.boolean | No | false |
Returns: tcp.Message?
Behavior
- RequestProtocol and ResponseProtocol lookup parameters select declared protocol names. getRequestProtocol returns the selected request protocol; newMessage constructs its typed message.
- Message load and data use the protocol section and field structure. Framing, encoding, bitmaps and TLV follow the declared protocol contract, not arbitrary socket code. A protocol bitmap selects fields by their declared identifiers from ordinary section data; it does not require a Process-created bit-set handle. Standalone native msb/lsb scalar fields have no AIScript value representation in this contract.
- send returns the decoded response Message. Asynchronous submission returns null, runs the complete exchange and discards its response. It is not durable delivery.