mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-22 10:07:44 +00:00
fix lobby gameconnection
This commit is contained in:
parent
41e6d73ff3
commit
472c41cda6
5 changed files with 5 additions and 13 deletions
|
@ -12,11 +12,6 @@ x ## Ptr make_ ## x( Args &&...args ) { \
|
||||||
return std::make_shared< x >( std::forward< Args >( args ) ... ); }\
|
return std::make_shared< x >( std::forward< Args >( args ) ... ); }\
|
||||||
typedef std::vector< x > x ## PtrList;
|
typedef std::vector< x > x ## PtrList;
|
||||||
|
|
||||||
namespace Sapphire
|
|
||||||
{
|
|
||||||
TYPE_FORWARD( Framework );
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace Sapphire::Lobby
|
namespace Sapphire::Lobby
|
||||||
{
|
{
|
||||||
TYPE_FORWARD( LobbySession );
|
TYPE_FORWARD( LobbySession );
|
||||||
|
|
|
@ -25,9 +25,8 @@ extern Lobby::ServerLobby g_serverLobby;
|
||||||
extern Lobby::RestConnector g_restConnector;
|
extern Lobby::RestConnector g_restConnector;
|
||||||
|
|
||||||
Lobby::GameConnection::GameConnection( Sapphire::Network::HivePtr pHive,
|
Lobby::GameConnection::GameConnection( Sapphire::Network::HivePtr pHive,
|
||||||
Sapphire::Network::AcceptorPtr pAcceptor,
|
Sapphire::Network::AcceptorPtr pAcceptor ) :
|
||||||
FrameworkPtr pFw ) :
|
Sapphire::Network::Connection( pHive ),
|
||||||
Sapphire::Network::Connection( pHive, pFw ),
|
|
||||||
m_pAcceptor( pAcceptor ),
|
m_pAcceptor( pAcceptor ),
|
||||||
m_bEncryptionInitialized( false )
|
m_bEncryptionInitialized( false )
|
||||||
{
|
{
|
||||||
|
@ -42,7 +41,7 @@ Lobby::GameConnection::~GameConnection()
|
||||||
// overwrite the parents onConnect for our game socket needs
|
// overwrite the parents onConnect for our game socket needs
|
||||||
void Lobby::GameConnection::onAccept( const std::string& host, uint16_t port )
|
void Lobby::GameConnection::onAccept( const std::string& host, uint16_t port )
|
||||||
{
|
{
|
||||||
auto connection = make_GameConnection( m_hive, m_pAcceptor, m_pFw );
|
auto connection = make_GameConnection( m_hive, m_pAcceptor );
|
||||||
m_pAcceptor->accept( connection );
|
m_pAcceptor->accept( connection );
|
||||||
|
|
||||||
Logger::info( "Connect from {0}", m_socket.remote_endpoint().address().to_string() );
|
Logger::info( "Connect from {0}", m_socket.remote_endpoint().address().to_string() );
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace Sapphire::Lobby
|
||||||
std::vector< uint8_t > m_packets;
|
std::vector< uint8_t > m_packets;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GameConnection( Network::HivePtr pHive, Network::AcceptorPtr pAcceptor, FrameworkPtr pFw );
|
GameConnection( Network::HivePtr pHive, Network::AcceptorPtr pAcceptor );
|
||||||
|
|
||||||
~GameConnection();
|
~GameConnection();
|
||||||
|
|
||||||
|
|
|
@ -64,9 +64,8 @@ namespace Sapphire::Lobby
|
||||||
|
|
||||||
Logger::setLogLevel( m_config.global.general.logLevel );
|
Logger::setLogLevel( m_config.global.general.logLevel );
|
||||||
|
|
||||||
auto pFw = make_Framework();
|
|
||||||
auto hive = Network::make_Hive();
|
auto hive = Network::make_Hive();
|
||||||
Network::addServerToHive< GameConnection >( m_ip, m_port, hive, pFw );
|
Network::addServerToHive< GameConnection >( m_ip, m_port, hive );
|
||||||
|
|
||||||
Logger::info( "Lobby server running on {0}:{1}", m_ip, m_port );
|
Logger::info( "Lobby server running on {0}:{1}", m_ip, m_port );
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ TYPE_FORWARD( ItemContainer );
|
||||||
TYPE_FORWARD( ZonePosition );
|
TYPE_FORWARD( ZonePosition );
|
||||||
TYPE_FORWARD( Land );
|
TYPE_FORWARD( Land );
|
||||||
TYPE_FORWARD( Linkshell );
|
TYPE_FORWARD( Linkshell );
|
||||||
TYPE_FORWARD( Framework );
|
|
||||||
|
|
||||||
namespace World
|
namespace World
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue