protocol via script

This commit is contained in:
Eduardo Bart
2011-05-30 22:55:34 -03:00
parent e239b0d611
commit 9b2d71f6d8
13 changed files with 132 additions and 16 deletions

View File

@@ -28,6 +28,7 @@
#include <net/connection.h>
#include <net/inputmessage.h>
#include <net/outputmessage.h>
#include <script/scriptable.h>
#define CIPSOFT_PUBLIC_RSA "1321277432058722840622950990822933849527763264961655079678763618" \
"4334395343554449668205332383339435179772895415509701210392836078" \
@@ -37,7 +38,7 @@
//#define RSA "109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413"
class Protocol
class Protocol : public Scriptable
{
public:
Protocol();
@@ -48,6 +49,8 @@ public:
virtual void onRecv(InputMessage *inputMessage);
virtual void onError(const boost::system::error_code& error);
virtual const char *getScriptableName() const { return "Protocol"; }
protected:
uint32 m_xteaKey[4];
bool m_xteaEncryptionEnabled;
@@ -60,4 +63,6 @@ private:
ConnectionPtr m_connection;
};
typedef boost::shared_ptr<Protocol> ProtocolPtr;
#endif