Content
of TormItfc.h
class __declspec(dllexport) TormInterface
{
public:
TormInterface(){};
virtual ~TormInterface(){};
static void OnReceive(void * app,void * buf, int size);
static void * NewApp(void * agent,int argc,const char*const* argv);
static void DeleteApp(void * app);
static int DispatchCMD ( void * app,int argc , const char*const* argv);
static void OnTimer(void * handler);
};
Description
In the above interface class,NsTorm.dll has defined several Interfaces to be
called by ns.
- OnReceive
Ns call this function to convey the data from the network to the application
object defined in the dll. The object is refered by it's address pointer (void
* app).
- NewApp
Ns call this function to new an application object in DLL. The "argc"
and "argv" combination gives the name of the application and the parameters
used to new the application object.
- DeleteApp
Ns call this function to delete an application object in DLL.
- DispatchCMD
Ns call this function to dispatch a command to the appliation object.
- OnTimer
Ns call this function to notify the application object on its timer's expire.