application:


  class application: public session {
      public:
          application(int argc, char* argv[], char* name):
                  session(argc, argv, 0) {}
  
          int main() {
                  url* x;
                  x = new url("http://www.cs.vu.nl/~eliens");
                  cerr << *x << endl;
                  x = new url("tcp://localhost:3010/whatis");
                  cerr << *x << endl;
                  x = new url("corba://hush:3010/clock");
                  cerr << *x << endl;
                  x = new url("hush:3010/clock");
                  cerr << *x << endl;
                  x = new url("clock");
                  cerr << *x << endl;
  
                  char* Buffer;
                  int Length;
                  client net;
  
                  net.get("example.txt");
                  net.send_request();
                  net.get_reply_body(Buffer, Length);
                  
                  cout << "The file is:" << endl;
                  cout << Buffer;
                  cout << "The length is: " << Length << endl;
                  MIME* m = net.media();
                  cout << "The MIME type is: ";
                  if (m) cout << m->type() << "/" << m->subtype() << endl;
                  tk->quit();
                  return OK;
          }
  };

slide: application: