to webnode.cc

  /*
   * GlobalPoolApp
   * Basisklasse fuer GlobalClient, GlobalServer und GlobalProxy
   */
  int GlobalPoolApp::command(int argc, const char*const* argv)
   {
    Tcl& tcl = Tcl::instance();
  
    debug("GlobalPoolHost::command(): command is %s\n", argv[1]);
  
-   if (!strcmp(argv[1], "set-fid_")) {
-     if (argc < 3) {
-       fprintf(stderr, "expecting obj sett fid_ \n\n");
-       return TCL_ERROR;
-     }
-     fid_ = atoi(argv[2]);
-     return TCL_OK;
-   }
- 
    if(strcmp(argv[1], "getID") == 0)
     {
      tcl.resultf("%d", getID());
      return TCL_OK;
     }


***************
*** 705,751 ****
  Socket::Socket(GlobalPoolApp *app) : app_(app), conn_(NULL), 
state_(SOCK_DOWN)
   {
    Tcl& tcl = Tcl::instance();
    
    node_ = app->getNode();
  
    // get new agent
    tcl.eval("new Agent/TCP/FullTcp/Wrapper");
    agent_ = (FullTcpWrapper *)tcl.lookup(tcl.result());
  
!   // attach Agent to Node
    tcl.evalf("%s attach %s", node_->name(), agent_->name());
- 
-   // set the fid_ of the agent
-   tcl.evalf("%s set fid_ %d", agent_->naame(), app->fid_);
    
    // attach application (that's us) to agent
    agent_->attachApp(this);
  
    ((FullTcpWrapper *)agent_)->attachSocket(this);
  



to webnode.h

    protected:
     virtual int command(int argc, const char*const* argv);
  
    public:
!    int           fid_;
! 
!    GlobalPoolApp(GlobalPool *pool, Node *node, conn_type_ type = SIMPLE)
!      : pool_(pool), node_(node), supp_c_t_(type), fid_(0)
      {
       id_ = id_generator_++;
  
       debug("GlobalPoolApp()-Constructor: ID = %d\n", id_);
      }
  
     ~GlobalPoolApp()
      {
       debug("GlobalPoolApp()-Destructor: ID = %d\n", id_);
      }
  

    Source: geocities.com/siliconvalley/sector/6826/thesis/bio

               ( geocities.com/siliconvalley/sector/6826/thesis)                   ( geocities.com/siliconvalley/sector/6826)                   ( geocities.com/siliconvalley/sector)                   ( geocities.com/siliconvalley)