mirror of
https://github.com/edubart/otclient.git
synced 2025-12-16 13:49:47 +01:00
reorganize sources
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "connection.h"
|
||||
|
||||
#include <core/eventdispatcher.h>
|
||||
#include <framework/core/eventdispatcher.h>
|
||||
|
||||
static asio::io_service ioService;
|
||||
|
||||
@@ -26,7 +26,7 @@ void Connection::connect(const std::string& host, uint16 port, const ConnectCall
|
||||
{
|
||||
m_connectCallback = connectCallback;
|
||||
|
||||
asio::ip::tcp::resolver::query query(host, aux::unsafe_cast<std::string>(port));
|
||||
asio::ip::tcp::resolver::query query(host, fw::unsafe_cast<std::string>(port));
|
||||
m_resolver.async_resolve(query, std::bind(&Connection::onResolve, shared_from_this(), std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
m_timer.expires_from_now(boost::posix_time::seconds(2));
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef CONNECTION_H
|
||||
#define CONNECTION_H
|
||||
|
||||
#include "netdeclarations.h"
|
||||
#include "declarations.h"
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
class Connection : public std::enable_shared_from_this<Connection>, boost::noncopyable
|
||||
{
|
||||
@@ -11,7 +12,7 @@ class Connection : public std::enable_shared_from_this<Connection>, boost::nonco
|
||||
|
||||
public:
|
||||
Connection();
|
||||
~Connection();
|
||||
virtual ~Connection();
|
||||
|
||||
static void poll();
|
||||
|
||||
|
||||
17
src/framework/net/declarations.h
Normal file
17
src/framework/net/declarations.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef FRAMEWORK_NET_DECLARATIONS_H
|
||||
#define FRAMEWORK_NET_DECLARATIONS_H
|
||||
|
||||
#include <framework/global.h>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
||||
class Connection;
|
||||
class InputMessage;
|
||||
class OutputMessage;
|
||||
class Protocol;
|
||||
|
||||
typedef std::shared_ptr<Connection> ConnectionPtr;
|
||||
typedef std::shared_ptr<Protocol> ProtocolPtr;
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef INPUTMESSAGE_H
|
||||
#define INPUTMESSAGE_H
|
||||
|
||||
#include "netdeclarations.h"
|
||||
#include "declarations.h"
|
||||
|
||||
class InputMessage
|
||||
{
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#ifndef NETDECLARATIONS_H
|
||||
#define NETDECLARATIONS_H
|
||||
|
||||
#include <global.h>
|
||||
#include <boost/asio.hpp>
|
||||
|
||||
namespace asio = boost::asio;
|
||||
|
||||
class Connection;
|
||||
class InputMessage;
|
||||
class OutputMessage;
|
||||
class Protocol;
|
||||
|
||||
typedef std::shared_ptr<Connection> ConnectionPtr;
|
||||
typedef std::shared_ptr<Protocol> ProtocolPtr;
|
||||
|
||||
#define CIPSOFT_PUBLIC_RSA "1321277432058722840622950990822933849527763264961655079678763618" \
|
||||
"4334395343554449668205332383339435179772895415509701210392836078" \
|
||||
"6959821132214473291575712138800495033169914814069637740318278150" \
|
||||
"2907336840325241747827401343576296990629870233111328210165697754" \
|
||||
"88792221429527047321331896351555606801473202394175817"
|
||||
|
||||
|
||||
#define OTSERV_PUBLIC_RSA "1091201329673994292788609605089955415282375029027981291234687579" \
|
||||
"3726629149257644633073969600111060390723088861007265581882535850" \
|
||||
"3429057592827629436413108566029093628212635953836686562675849720" \
|
||||
"6207862794310902180176810615217550567108238764764442605581471797" \
|
||||
"07119674283982419152118103759076030616683978566631413"
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <net/outputmessage.h>
|
||||
#include <framework/net/outputmessage.h>
|
||||
|
||||
OutputMessage::OutputMessage()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef OUTPUTMESSAGE_H
|
||||
#define OUTPUTMESSAGE_H
|
||||
|
||||
#include "netdeclarations.h"
|
||||
#include "declarations.h"
|
||||
|
||||
class OutputMessage
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#ifndef PROTOCOL_H
|
||||
#define PROTOCOL_H
|
||||
|
||||
#include "netdeclarations.h"
|
||||
#include "declarations.h"
|
||||
#include "inputmessage.h"
|
||||
#include "outputmessage.h"
|
||||
|
||||
#include <luascript/luaobject.h>
|
||||
#include <framework/luascript/luaobject.h>
|
||||
|
||||
class Protocol : public LuaObject
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef RSA_H
|
||||
#define RSA_H
|
||||
|
||||
#include <global.h>
|
||||
#include <framework/global.h>
|
||||
#include <gmp.h>
|
||||
|
||||
class Rsa
|
||||
|
||||
Reference in New Issue
Block a user