The DejaVU Framework -- hush 3.0
[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?

source: client.c hush-3.0b4/auxiliary/net/examples/client


[.] - [up] [top] - index text make source scripts configure
  // 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>
  
  

application:


  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;
          }
  };

slide: application:

  
  

main


  
  int main(int argc, char* argv[])
  {
          application App(argc, argv, 0);
          return App.run();
  }
  
  

slide: main

  

[.] Papers Tutorials Examples Manuals Interfaces Sources Packages Resources ?
Hush Online Technology
hush@cs.vu.nl
09/09/98