SpiecsEngine
 
Loading...
Searching...
No Matches

◆ Start()

void Spices::Net::TcpServer::Start ( int threadSize) const

Start ThreadPool and call listen on acceptor.

Parameters
[in]threadSizeThreadPool size.

Definition at line 46 of file TcpServer.cpp.

47 {
49
50 if(!m_ThreadPool->IsPoolRunning())
51 {
53 m_ThreadPool->Start(threadSize, m_ThreadInitCallback);
54 }
55 }
#define SPICES_PROFILE_ZONE
static EventLoop *& GetInst(InetAddress *address=nullptr)
Get EventLoop Instance. @reutrn Returns EventLoop Instance.
void RunInLoop(Functor cb)
Push functor to pending functors.
Definition EventLoop.cpp:79
std::shared_ptr< EventLoopThreadPool > m_ThreadPool
ThreadPool.
Definition TcpServer.h:145
ThreadInitCallback m_ThreadInitCallback
ThreadInitCallback.
Definition TcpServer.h:165
std::unique_ptr< Acceptor > m_Acceptor
Acceptor.
Definition TcpServer.h:140

References Spices::Net::EventLoopThreadWrapper::GetInst().