Retrieving client data stream messages

A message data stream triggers an Open Server application’s SRV_MSG event handler. This handler can retrieve the client message. To do this:

  1. Call srv_msg with cmd set to CS_GET and msgidp pointing to the buffer in which Open Server should place the message ID.

    srv_msg sets the statusp parameter to SRV_HASPARAMS if the message has parameters.

    See srv_msg.

  2. Call srv_numparams, if necessary, to retrieve the number of parameters.

  3. Call srv_descfmt, srv_bind, and srv_xferdata to describe and retrieve each parameter. See the “Processing parameter and row data”.

An Open Server application can only retrieve messages using its SRV_MSG event handler.