UDP Server Adapter
The UDP Server Adapter receives connections from one or more UDP clients. The adapter passes the data stream to a parser. The parser parses the data stream into data tokens, which the mapping function converts into events.
The following table describes the UDP Server Adapter parameters.
UDP Server Adapter configuration parameters
Parameter | Description | |
---|---|---|
instanceName | Name of the adapter instance The instance name is the first entry in the adapter configuration and must be enclosed in square brackets. Note To run more than one instance of the adapter, specify a unique name and configuration for each adapter instance. | |
Engine | Type of adapter in use. Required Valid value: MA::Adapter::UdpServer | |
IdleTimeout | Maximum time, in seconds, after which new data is expected to have arrived. After this time, the connection is considered unsuccessful. Default: 15 | |
LocalHost | Local IP address on a computer with multiple network interfaces to which the UDP Client Adapter binds Note Do not specify localhost, 127.0.0.1, or INADDR_ANY as a value for this parameter. Valid values: host name or IP address | |
LocalPort | Local port number on which the UDP Server Adapter listens for connections Default: 2000 | |
Mapfile | Name of the MAP file used to generate events from the tokenized data Required | |
Parser | Parser instance that must be used to parse and tokenize the client input stream
| |
RestartInterval | Interval, in seconds, at which the UDP Server Adapter reattempts to bind to the local port if that port is busy when the adapter makes its first bind attempt Default: 60 |
The following figure shows a sample UDP Server Adapter configuration, as it would appear in the mcxa.conf file:
Sample UDP Server Adapter configuration
[MyUDPServer]
Engine = MA::Adapter::UdpServer
MapFile = mcudpsrv.map
LocalPort = 1997
Parser = SeparatorParser
Diagnostics
All adapter errors are logged as events. Optionally, you can enable tracing by setting the tracing parameters in the global section of the mcxa.conf file. For more information, see
Enabling tracing
.
The UDP Server Adapter can generate the following errors:
ERR_RECV
—Indicates that an error occurred when receiving data from the serverERR_UDP_INIT
—Indicates that an error occurred when starting the UDP connection
For more information, see the event that is created for this error.
Comments
Log in or register to comment.