File: zoom.events.html

package info (click to toggle)
yaz 3.0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 13,404 kB
  • ctags: 12,108
  • sloc: xml: 116,075; ansic: 52,205; sh: 9,746; tcl: 2,043; makefile: 1,141; yacc: 347
file content (28 lines) | stat: -rw-r--r-- 4,005 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>8.�Events</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="zoom.html" title="Chapter�3.�ZOOM"><link rel="prev" href="zoom.options.html" title="7.�Options"><link rel="next" href="server.html" title="Chapter�4.�Generic server"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.�Events</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="zoom.options.html">Prev</a>�</td><th width="60%" align="center">Chapter�3.�ZOOM</th><td width="20%" align="right">�<a accesskey="n" href="server.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="zoom.events"></a>8.�Events</h2></div></div></div><p>
    If you're developing non-blocking applications, you have to deal 
    with events.
   </p><pre class="synopsis">
    int ZOOM_event (int no, ZOOM_connection *cs);
   </pre><p>
    The <code class="function">ZOOM_event</code> executes pending events for
    a number of connections. Supply the number of connections in
    <code class="literal">no</code> and an array of connections in
    <code class="literal">cs</code> (<code class="literal">cs[0] ... cs[no-1]</code>).
    A pending event could be a sending a search, receiving a response,
    etc.
    When an event has occurred for one of the connections, this function
    returns a positive integer <code class="literal">n</code> denoting that an event
    occurred for connection <code class="literal">cs[n-1]</code>.
    When no events are pending for the connections, a value of zero is
    returned.
    To ensure that all outstanding requests are performed call this function
    repeatedly until zero is returned.
   </p><p>
    If <code class="function">ZOOM_event</code> returns and returns non-zero, the
    last event that occurred can be expected.
   </p><pre class="synopsis">
    int ZOOM_connection_last_event(ZOOM_connection cs);
   </pre><p>
    <code class="function">ZOOM_connection_last_event</code> returns an event type
    (integer) for the last event.
   </p><div class="table"><a name="zoom.event.ids"></a><p class="title"><b>Table�3.10.�ZOOM Event IDs</b></p><div class="table-contents"><table summary="ZOOM Event IDs" border="1"><colgroup><col><col></colgroup><thead><tr><th>Event</th><th>Description</th></tr></thead><tbody><tr><td>ZOOM_EVENT_NONE</td><td>No event has occurred</td></tr><tr><td>ZOOM_EVENT_CONNECT</td><td>TCP/IP connect has initiated</td></tr><tr><td>ZOOM_EVENT_SEND_DATA</td><td>Data has been transmitted (sending)</td></tr><tr><td>ZOOM_EVENT_RECV_DATA</td><td>Data has been received)</td></tr><tr><td>ZOOM_EVENT_TIMEOUT</td><td>Timeout</td></tr><tr><td>ZOOM_EVENT_UNKNOWN</td><td>Unknown event</td></tr><tr><td>ZOOM_EVENT_SEND_APDU</td><td>An APDU has been transmitted (sending)</td></tr><tr><td>ZOOM_EVENT_RECV_APDU</td><td>An APDU has been received</td></tr><tr><td>ZOOM_EVENT_RECV_RECORD</td><td>A result-set record has been received</td></tr><tr><td>ZOOM_EVENT_RECV_SEARCH</td><td>A search result been received</td></tr></tbody></table></div></div><br class="table-break"></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="zoom.options.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="zoom.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="server.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">7.�Options�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�4.�Generic server</td></tr></table></div></body></html>