#include <router.h>
类 Router 继承关系图:
Router 的协作图:Public 成员函数 | |
| void | AsyncRun (size_t worker_threads) |
| PrimaryCommands & | GetCommander () |
| boost::asio::ip::tcp::endpoint | GetLocalEndpoint () const |
| std::weak_ptr< Primary > | GetNextServer () |
| bool | HasClientsConnected () |
| Router (uint16_t port) | |
| Router (void) | |
| void | SetCallbacks () |
| void | SetNewConnectionCallback (std::function< void(void)>) |
| void | Stop () |
| void | Write (MultiGPUCommand id, Buffer &&buffer) |
| std::future< SessionInfo > | WriteToNext (MultiGPUCommand id, Buffer &&buffer) |
| std::future< SessionInfo > | WriteToOne (std::weak_ptr< Primary > server, MultiGPUCommand id, Buffer &&buffer) |
| ~Router () | |
Private 成员函数 | |
| void | ClearSessions () |
| void | ConnectSession (std::shared_ptr< Primary > session) |
| void | DisconnectSession (std::shared_ptr< Primary > session) |
Private 属性 | |
| std::function< void(void)> | _callback |
| PrimaryCommands | _commander |
| boost::asio::ip::tcp::endpoint | _endpoint |
| std::shared_ptr< Listener > | _listener |
| std::mutex | _mutex |
| uint32_t | _next |
| ThreadPool | _pool |
| std::unordered_map< Primary *, std::shared_ptr< std::promise< SessionInfo > > > | _promises |
| std::vector< std::shared_ptr< Primary > > | _sessions |
| Router::Router | ( | void | ) |
在文件 router.cpp 第 15 行定义.
|
explicit |
在文件 router.cpp 第 40 行定义.
| Router::~Router | ( | ) |
| void Router::AsyncRun | ( | size_t | worker_threads | ) |
在文件 router.cpp 第 104 行定义.
引用了 _pool.
|
private |
|
private |
在文件 router.cpp 第 118 行定义.
引用了 _callback, _mutex, _sessions , 以及 DEBUG_ASSERT.
|
private |
在文件 router.cpp 第 133 行定义.
引用了 _mutex, _sessions , 以及 DEBUG_ASSERT.
|
inline |
引用了 _commander.
| boost::asio::ip::tcp::endpoint Router::GetLocalEndpoint | ( | ) | const |
在文件 router.cpp 第 109 行定义.
引用了 _endpoint.
| std::weak_ptr< Primary > Router::GetNextServer | ( | ) |
在文件 router.cpp 第 264 行定义.
| void Router::SetCallbacks | ( | ) |
在文件 router.cpp 第 58 行定义.
引用了 _commander, _endpoint, _listener , 以及 _promises.
| void Router::SetNewConnectionCallback | ( | std::function< void(void)> | func | ) |
在文件 router.cpp 第 97 行定义.
引用了 _callback.
| void Router::Stop | ( | ) |
在文件 router.cpp 第 29 行定义.
引用了 _listener, _pool , 以及 ClearSessions().
被这些函数引用 ~Router().
函数调用图:
这是这个函数的调用关系图:| void Router::Write | ( | MultiGPUCommand | id, |
| Buffer && | buffer | ||
| ) |
| std::future< SessionInfo > Router::WriteToNext | ( | MultiGPUCommand | id, |
| Buffer && | buffer | ||
| ) |
在文件 router.cpp 第 193 行定义.
引用了 _mutex, _next, _promises, _sessions , 以及 carla::BufferView::CreateFrom().
函数调用图:| std::future< SessionInfo > Router::WriteToOne | ( | std::weak_ptr< Primary > | server, |
| MultiGPUCommand | id, | ||
| Buffer && | buffer | ||
| ) |
|
private |
被这些函数引用 ConnectSession() , 以及 SetNewConnectionCallback().
|
private |
被这些函数引用 GetCommander() , 以及 SetCallbacks().
|
private |
被这些函数引用 GetLocalEndpoint(), Router() , 以及 SetCallbacks().
|
private |
被这些函数引用 Router(), SetCallbacks() , 以及 Stop().
|
private |
被这些函数引用 ClearSessions(), ConnectSession(), DisconnectSession(), GetNextServer(), Write(), WriteToNext() , 以及 WriteToOne().
|
private |
被这些函数引用 GetNextServer() , 以及 WriteToNext().
|
private |
被这些函数引用 AsyncRun(), Router() , 以及 Stop().
|
private |
被这些函数引用 SetCallbacks(), WriteToNext() , 以及 WriteToOne().
|
private |