Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
WorldSocketMgr.h
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
11
12
#ifndef SF_WORLDSOCKETMGR_H
13
#define SF_WORLDSOCKETMGR_H
14
15
#include "
Common.h
"
16
#include "
Platform/Singleton.h
"
17
#include <boost/asio/io_context.hpp>
18
19
class
WorldSocket
;
20
class
ReactorRunnable
;
21
23
class
WorldSocketMgr
24
{
25
public
:
26
friend
class
WorldSocket
;
27
friend
class
WorldSocketAcceptor
;
28
friend
class
Skyfire::Singleton
<
WorldSocketMgr
,
Skyfire
::Mutex>;
29
31
int
StartNetwork
(uint16 port, const char* address);
32
34
void
StopNetwork
();
35
37
void
Wait
();
38
39
private
:
40
int
OnSocketOpen
(WorldSocket* sock, ReactorRunnable* reactor);
41
42
int
StartReactiveIO
(uint16 port, const char* address);
43
ReactorRunnable
*
SelectNetworkThread
();
44
boost::asio::io_context&
GetNetworkIoContext
(ReactorRunnable* reactor);
45
46
private
:
47
WorldSocketMgr
();
48
virtual
~
WorldSocketMgr
();
49
50
ReactorRunnable
*
m_NetThreads
;
51
size_t
m_NetThreadsCount
;
52
53
int
m_SockOutKBuff
;
54
int
m_SockOutUBuff
;
55
bool
m_UseNoDelay
;
56
57
class
WorldSocketAcceptor
*
m_Acceptor
;
58
};
59
60
#define sWorldSocketMgr Skyfire::Singleton<WorldSocketMgr, Skyfire::Mutex>::instance()
61
62
#endif
Common.h
Singleton.h
ReactorRunnable
Definition
WorldSocketMgr.cpp:35
Skyfire::Singleton
Definition
Singleton.h:15
WorldSocket
Handler that can communicate over stream sockets.
Definition
WorldSocket.h:51
WorldSocketMgr::WorldSocketAcceptor
friend class WorldSocketAcceptor
Definition
WorldSocketMgr.h:27
WorldSocketMgr::WorldSocket
friend class WorldSocket
Definition
WorldSocketMgr.h:26
WorldSocketMgr::m_SockOutKBuff
int m_SockOutKBuff
Definition
WorldSocketMgr.h:53
WorldSocketMgr::StartNetwork
int StartNetwork(uint16 port, const char *address)
Start network, listen at address:port .
Definition
WorldSocketMgr.cpp:232
WorldSocketMgr::GetNetworkIoContext
boost::asio::io_context & GetNetworkIoContext(ReactorRunnable *reactor)
Definition
WorldSocketMgr.cpp:321
WorldSocketMgr::m_NetThreadsCount
size_t m_NetThreadsCount
Definition
WorldSocketMgr.h:51
WorldSocketMgr::StartReactiveIO
int StartReactiveIO(uint16 port, const char *address)
Definition
WorldSocketMgr.cpp:170
WorldSocketMgr::SelectNetworkThread
ReactorRunnable * SelectNetworkThread()
Definition
WorldSocketMgr.cpp:307
WorldSocketMgr::WorldSocketMgr
WorldSocketMgr()
Definition
WorldSocketMgr.cpp:155
WorldSocketMgr::m_SockOutUBuff
int m_SockOutUBuff
Definition
WorldSocketMgr.h:54
WorldSocketMgr::OnSocketOpen
int OnSocketOpen(WorldSocket *sock, ReactorRunnable *reactor)
Definition
WorldSocketMgr.cpp:272
WorldSocketMgr::Wait
void Wait()
Wait untill all network threads have "joined" .
Definition
WorldSocketMgr.cpp:262
WorldSocketMgr::m_NetThreads
ReactorRunnable * m_NetThreads
Definition
WorldSocketMgr.h:50
WorldSocketMgr::m_Acceptor
class WorldSocketAcceptor * m_Acceptor
Definition
WorldSocketMgr.h:57
WorldSocketMgr::StopNetwork
void StopNetwork()
Stops all network threads, It will wait for all running threads .
Definition
WorldSocketMgr.cpp:243
WorldSocketMgr::m_UseNoDelay
bool m_UseNoDelay
Definition
WorldSocketMgr.h:55
Skyfire
Definition
AuthPatchTransfer.h:12
src
server
game
Server
WorldSocketMgr.h
Generated on
for Project SkyFire Core by
1.17.0