Blame | Last modification | View Log | RSS feed
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>liboop: oop_www_register(), oop_www_cancel(), oop_www_memory()</title><link rel="stylesheet" type="text/css" href="style.css"></head><body><h2>oop_www_register(), oop_www_cancel(), oop_www_memory()</h2><pre>#include <oop.h>#include <HTEvent.h>#include <oop-www.h>void oop_www_register(oop_source *source);void oop_www_cancel();void oop_www_memory();</pre><h3>Arguments.</h3><dl><dt><b>oop_source *source</b><dd>The event source to use. The adapter will use this event source to waitasynchronously for network communication.<p></dl><h3>Description.</h3><dl><dt><b>oop_www_register</b><dd>Register a liboop <em>source</em> with the<a href="http://www.w3.org/Library/">W3C Protocol Library</a> (libwww).The adapter acts as an event manager for the libwww<a href="http://www.w3.org/Library/src/HTEvent.html">HTEvent module</a>,replacing the<a href="http://www.w3.org/Library/src/HTEvtLst.html">default eventmanager</a>; it relies on the supplied source for actual event handling.Refer to the libwww documentation for the details of its event architecture.<p><dt><b>oop_www_cancel</b><dd>Unregister liboop with libwww. This frees resources associated with theadapter, and leaves libwww with no event manager. You may use<b>HTEventInit</b> in the<a href="http://www.w3.org/Library/src/HTInit.html">HTInit module</a> toreinstate the libwww default event manager. The adapter can have no activeevents when it is deleted. (Take care; libwww tends to cache persistentconnections to Web servers, which may cause events to be registered even ifthere are no open requests.)<p><dt><b>oop_www_memory</b><dd>Set <a href="alloc">oop_malloc, oop_realloc, and oop_free</a> to<a href="http://www.w3.org/Library/src/HTMemory.html">HTMemory_mallocand HTMemory_free</a>, respectively. You do not need to do this, but itmay help to keep your memory allocations consistent with the libwwwframework. If you do this, do so before calling any other liboop functions.</dl><hr><a href="ref">liboop reference</a></body></html>