wftk core: server connection adaptor

[ back to the core ] [ discussion ]

A server connection adaptor creates and manages connections to external servers. These connections will be used by QUERY adaptors. At some point, database connections may well be moved over here, but at the moment the canonical connection adaptor is the HTML post adaptor, which will be used to query EuroDicAutom and also notify external servers that we exist.

These are the functions exposed by a server connection adaptor:
0: init   Initialize adaptor instance
1: free   Clean up instance before shutting down
2: info   Return XML describing the adaptor
3: send XML * query
XML * data (optionally separate)
Send the given query to the server; return the reply. If the query is a delayable query, this may simply return a NULL and model the reply as an event.


This code and documentation are released under the terms of the GNU license. They are additionally copyright (c) 2000, Vivtek. All rights reserved except those explicitly granted under the terms of the GNU license. This presentation was prepared with LPML. Try literate programming. You'll like it.