#include <inval-agent.h>
Inheritance diagram for HttpUInvalAgent:


Public Member Functions | |
| HttpUInvalAgent (Agent *a) | |
| void | send (int realsize, AppData *data) |
| virtual void | process_data (int size, AppData *data) |
| virtual AppData * | get_data (int &, AppData *) |
| virtual void | recv (int nbytes) |
| virtual void | send (int nbytes) |
| void | connect (TcpApp *dst) |
| virtual void | resume () |
| Process *& | target () |
| virtual void | send_data (int size, AppData *data=0) |
Protected Member Functions | |
| virtual int | command (int argc, const char *const *argv) |
| CBuf * | rcvr_retrieve_data () |
| virtual void | start () |
| virtual void | stop () |
Protected Attributes | |
| TcpApp * | dst_ |
| CBufList | cbuf_ |
| CBuf * | curdata_ |
| int | curbytes_ |
| Agent * | agent_ |
| int | enableRecv_ |
| int | enableResume_ |
| Process * | target_ |
|
|
Definition at line 70 of file inval-agent.h.
00070 : TcpApp(a) {} |
|
||||||||||||
|
Reimplemented from TcpApp. Definition at line 100 of file inval-agent.cc. References TcpApp::command(), and Process::target_.
|
Here is the call graph for this function:

|
|
Definition at line 90 of file tcpapp.h. References TcpApp::dst_. Referenced by TcpApp::command().
00090 { dst_ = dst; }
|
|
||||||||||||
|
Reimplemented from TcpApp. Definition at line 76 of file inval-agent.h. References abort().
00076 {
00077 abort();
00078 return NULL;
00079 }
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from TcpApp. Definition at line 95 of file inval-agent.cc. References Process::process_data(), and Process::target_.
00096 {
00097 target_->process_data(size, data);
00098 }
|
Here is the call graph for this function:

|
|
Definition at line 104 of file tcpapp.h. References TcpApp::cbuf_, and CBufList::detach(). Referenced by TcpApp::recv().
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Definition at line 159 of file tcpapp.cc. References abort(), CBuf::bytes(), TcpApp::curbytes_, TcpApp::curdata_, CBuf::data(), TcpApp::dst_, Scheduler::instance(), TcpApp::process_data(), TcpApp::rcvr_retrieve_data(), and CBuf::size().
00160 {
00161 // If it's the start of a new transmission, grab info from dest,
00162 // and execute callback
00163 if (curdata_ == 0)
00164 curdata_ = dst_->rcvr_retrieve_data();
00165 if (curdata_ == 0) {
00166 fprintf(stderr, "[%g] %s receives a packet but no callback!\n",
00167 Scheduler::instance().clock(), name_);
00168 return;
00169 }
00170 curbytes_ += size;
00171 #ifdef TCPAPP_DEBUG
00172 fprintf(stderr, "[%g] %s gets data size %d, %s\n",
00173 Scheduler::instance().clock(), name(), curbytes_,
00174 curdata_->data());
00175 #endif
00176 if (curbytes_ == curdata_->bytes()) {
00177 // We've got exactly the data we want
00178 // If we've received all data, execute the callback
00179 process_data(curdata_->size(), curdata_->data());
00180 // Then cleanup this data transmission
00181 delete curdata_;
00182 curdata_ = NULL;
00183 curbytes_ = 0;
00184 } else if (curbytes_ > curdata_->bytes()) {
00185 // We've got more than we expected. Must contain other data.
00186 // Continue process callbacks until the unfinished callback
00187 while (curbytes_ >= curdata_->bytes()) {
00188 process_data(curdata_->size(), curdata_->data());
00189 curbytes_ -= curdata_->bytes();
00190 #ifdef TCPAPP_DEBUG
00191 fprintf(stderr,
00192 "[%g] %s gets data size %d(left %d)\n",
00193 Scheduler::instance().clock(),
00194 name(),
00195 curdata_->bytes(), curbytes_);
00196 //curdata_->data());
00197 #endif
00198 delete curdata_;
00199 curdata_ = dst_->rcvr_retrieve_data();
00200 if (curdata_ != 0)
00201 continue;
00202 if ((curdata_ == 0) && (curbytes_ > 0)) {
00203 fprintf(stderr, "[%g] %s gets extra data!\n",
00204 Scheduler::instance().clock(), name_);
00205 Tcl::instance().eval("[Simulator instance] flush-trace");
00206 abort();
00207 } else
00208 // Get out of the look without doing a check
00209 break;
00210 }
00211 }
00212 }
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Definition at line 214 of file tcpapp.cc.
00215 {
00216 // Do nothing
00217 }
|
|
|
Definition at line 109 of file app.cc. References Application::agent_, and Agent::sendmsg(). Referenced by Application::command(), TcpApp::send(), and TrafficGenerator::timeout().
|
Here is the call graph for this function:

|
||||||||||||
|
Reimplemented from TcpApp. Definition at line 72 of file inval-agent.h. References TcpApp::send(). Referenced by HttpMInvalCache::send_hb_helper(), and HttpYucInvalServer::send_hb_helper().
00072 {
00073 TcpApp::send(realsize, data);
00074 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 106 of file ns-process.h. References Process::process_data(), and Process::target_. Referenced by TcpApp::process_data(), and MediaApp::process_data().
00106 {
00107 if (target_)
00108 target_->process_data(size, data);
00109 }
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Definition at line 107 of file tcpapp.h. References abort().
00107 { abort(); }
|
Here is the call graph for this function:

|
|
Reimplemented from Application. Definition at line 108 of file tcpapp.h. References abort().
00108 { abort(); }
|
Here is the call graph for this function:

|
|
Definition at line 97 of file ns-process.h. References Process::target_. Referenced by QA::check_availability(), Process::command(), HttpApp::command(), MediaApp::get_data(), QA::output(), and TcpApp::process_data().
00097 { return target_; }
|
|
|
Definition at line 60 of file app.h. Referenced by Application::command(), RA_Traffic::init(), POO_Traffic::init(), EXPOO_Traffic::init(), CBR_Traffic::init(), CBR_PP_Traffic::init(), QA::rap(), MediaApp::rap(), Application::send(), TcpApp::TcpApp(), TrafficTrace::timeout(), TelnetApp::timeout(), EXPOO_Traffic::timeout(), CBR_PP_Traffic::timeout(), and TcpApp::~TcpApp(). |
|
|
Definition at line 111 of file tcpapp.h. Referenced by TcpApp::rcvr_retrieve_data(), and TcpApp::send(). |
|
|
Definition at line 113 of file tcpapp.h. Referenced by TcpApp::recv(). |
|
|
Definition at line 112 of file tcpapp.h. Referenced by TcpApp::recv(). |
|
|
Definition at line 110 of file tcpapp.h. Referenced by TcpApp::command(), TcpApp::connect(), and TcpApp::recv(). |
|
|
Definition at line 61 of file app.h. Referenced by Application::command(), and Application::recv(). |
|
|
Definition at line 62 of file app.h. Referenced by Application::command(), and Application::resume(). |
|
|
Definition at line 113 of file ns-process.h. Referenced by command(), Process::Process(), process_data(), Process::send_data(), and Process::target(). |
1.3.3