| 
    fastdo
    0.5.12
    
   | 
 
服务器类基础 更多...
#include <eiennet_socket.hpp>

Public 类型 | |
| using | ClientCtxSharedPointer = winux::SharedPointer< _ClientCtxClass > | 
| using | StartupHandlerFunction = std::function< void(ClientCtxSharedPointer clientCtxPtr) > | 
Public 成员函数 | |
| Server (ip::EndPoint const &ep, int threadCount=4, int backlog=0, double durationSec=0.1) | |
| 构造函数1  更多... | |
| virtual | ~Server () | 
| virtual int | run () | 
| size_t | getClientsCount () const | 
| void | onStartupHandler (StartupHandlerFunction handler) | 
| void | removeClient (winux::uint64 clientId) | 
Protected 成员函数 | |
| ClientCtxSharedPointer & | _addClient (ip::EndPoint const &clientEp, winux::SharedPointer< ip::tcp::Socket > clientSockPtr) | 
| virtual void | onStartup (ClientCtxSharedPointer clientCtxPtr) | 
服务器类基础
直接使用时,需要给定事件处理;继承时需要override相应的事件虚函数。
事件: onStartup() - 业务逻辑启动 
在文件 eiennet_socket.hpp 第 837 行定义.
| using eiennet::Server< _ClientCtxClass >::ClientCtxSharedPointer = winux::SharedPointer<_ClientCtxClass> | 
在文件 eiennet_socket.hpp 第 840 行定义.
| using eiennet::Server< _ClientCtxClass >::StartupHandlerFunction = std::function< void( ClientCtxSharedPointer clientCtxPtr ) > | 
在文件 eiennet_socket.hpp 第 841 行定义.
      
  | 
  inline | 
构造函数1
| ep | 服务监听的EndPoint | 
| threadCount | 线程池线程数量 | 
| backlog | listen(backlog) | 
| durationSec | 等待的时间(每个任务wait占用的时间片) | 
在文件 eiennet_socket.hpp 第 849 行定义.
      
  | 
  inlinevirtual | 
在文件 eiennet_socket.hpp 第 858 行定义.
      
  | 
  inlineprotected | 
在文件 eiennet_socket.hpp 第 913 行定义.
      
  | 
  inline | 
在文件 eiennet_socket.hpp 第 895 行定义.
      
  | 
  inlineprotectedvirtual | 
在文件 eiennet_socket.hpp 第 933 行定义.
      
  | 
  inline | 
在文件 eiennet_socket.hpp 第 901 行定义.
      
  | 
  inline | 
在文件 eiennet_socket.hpp 第 906 行定义.
      
  | 
  inlinevirtual | 
在文件 eiennet_socket.hpp 第 862 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 930 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 925 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 928 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 927 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 929 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 937 行定义.
      
  | 
  protected | 
在文件 eiennet_socket.hpp 第 926 行定义.