This module provides access to JSON-RPC 2.0 services (operating over TCP/Netstrings) in accordance with http://www.jsonrpc.org/specification. It uses JANSSON library for JSON document management. It uses t_suspend() and t_continue() from the TM module for asynchronous processing. Note that after invoking an asynchronous operation, the processing will continue later, in another application process. Therefore, do not rely on variables stored in private memory, use shared memory if you want to get values after the processing is resumed (e.g., $shv(...) or htable $sht(...)).
| Parámetro | Tipo | Descripción |
|---|---|---|
| min_srv_ttl | integer | 3.2. result_pv (string) 3.3. server (string) 3.4. retry_codes (string) 3.5. keep_alive (integer) |
| result_pv | string | 3.3. server (string) 3.4. retry_codes (string) 3.5. keep_alive (integer) |
| server | string | 3.4. retry_codes (string) 3.5. keep_alive (integer) |
| retry_codes | string | 3.5. keep_alive (integer) |
| keep_alive | integer | 3.1. min_srv_ttl (integer) |
| min_srv_ttl | integer | The minimum acceptable TTL in seconds for SRV DNS entries. This means that TTLs from the DNS will be ignored if they are lower than this value. It cannot be set lower than 1 second. |
| result_pv | string | The PV spec where to store the result of a call to janssonrpc_request(). It can be any writable PV. |
| server | string | The server providing the remote jsonrpc service. Format can be "conn=example;addr=localhost;port=9999;priority=10;weight=20" or "conn=bar;srv=_sip._tcp.example.net". |
| retry_codes | string | A comma delimited list of error codes or error code ranges to automatically schedule a request retry if received. |
| keep_alive | integer | number of seconds to send a tcp keep-alive to the server connection |
4.2. janssonrpc_request(conn, method, params[, options]])
4.1. janssonrpc_notification(conn, method, parameters)
* conn - name for a collection of servers (required) * method - jsonrpc method (required) * params - jsonrpc request params (required) Use $null or empty string to not send any parameters in the jsonrpc notification.
The conn, method, params, and options can be a static string or a dynamic string value with config variables.
Copyright © 2013 Flowroute LLC (flowroute.com)