40.1 The class Application

Application is a C++ class defined as follows:

        class Application : public TclObject {
        public:
                Application();
                virtual void send(int nbytes);
                virtual void recv(int nbytes);
                virtual void resume();
        protected:
                int command(int argc, const char*const* argv);
                virtual void start();
                virtual void stop();
                Agent *agent_;
                int enableRecv_;                // call OTcl recv or not
                int enableResume_;              // call OTcl resume or not
        };
Although objects of class Application are not meant to be instantiated, we do not make it an abstract base class so that it is visible from OTcl level. The class provides basic prototypes for application behavior (send(), recv(), resume(), start(), stop()), a pointer to the transport agent to which it is connected, and flags that indicate whether a OTcl-level upcall should be made for recv() and resume() events.



Tom Henderson 2011-11-05