// Simple example showing the use of the client library. include <hush/session.h> include <hush/kit.h> include <hush/client/client.h> include <hush/client/MIME.h> include <iostream.h>
class application: public session { public: application(int argc, char* argv[], char* name): session(argc, argv, 0) {} int main() { char* Buffer; int Length; client net; net.get("http://www.cs.vu.nl/~eliens/lib/x.tcl"); net.send_request(); net.get_reply_body(Buffer, Length); cout << "The hush homepage is:" << endl; cout << Buffer; cout << "The length is: " << Length << endl; MIME* m = net.media(); cout << "The MIME type is: "; cout << m->type() << "/" << m->subtype() << endl; tk->quit(); return OK; } };
int main(int argc, char* argv[]) { application App(argc, argv, 0); return App.run(); }
Hush Online Technology
hush@cs.vu.nl
09/09/98 |
![]() |
![]() |