net.h

Engine/source/app/net/net.h

More...

Classes:

Detailed Description

 1
 2#ifndef _NET_H_
 3#define _NET_H_
 4
 5#include "platform/platform.h"
 6#include "core/dnet.h"
 7#include "core/idGenerator.h"
 8#include "core/stream/bitStream.h"
 9#include "console/simBase.h"
10#include "console/console.h"
11#include "console/consoleTypes.h"
12#include "sim/netConnection.h"
13#include "sim/netObject.h"
14#include "app/net/serverQuery.h"
15#include "console/engineAPI.h"
16
17class RemoteCommandEvent : public NetEvent
18{
19public:
20   typedef NetEvent Parent;
21   enum {
22      MaxRemoteCommandArgs = 20,
23      CommandArgsBits = 5
24   };
25
26private:
27   S32 mArgc;
28   char *mArgv[MaxRemoteCommandArgs + 1];
29   NetStringHandle mTagv[MaxRemoteCommandArgs + 1];
30   static char mBuf[1024];
31
32public:
33   RemoteCommandEvent(S32 argc=0, const char **argv=<a href="/coding/file/types_8lint_8h/#types_8lint_8h_1a070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, NetConnection *conn = NULL);
34
35#ifdef TORQUE_DEBUG_NET
36   const char *getDebugName();
37#endif
38
39   ~RemoteCommandEvent();
40
41   virtual void pack(NetConnection* conn, BitStream *bstream);
42
43   virtual void write(NetConnection* conn, BitStream *bstream);
44
45   virtual void unpack(NetConnection* conn, BitStream *bstream);
46
47   virtual void process(NetConnection *conn);
48
49   static void sendRemoteCommand(NetConnection *conn, S32 argc, const char **argv);
50    
51   static void removeTaggedString(S32);
52
53   static const char* addTaggedString(const char* str);
54
55   static const char* getTaggedString(const char* tag);
56
57   DECLARE_CONOBJECT(RemoteCommandEvent);
58};
59
60#endif
61