| 150 | } |
| 151 | |
| 152 | std::shared_ptr<AFINet> AFCNetClientService::CreateNet(const proto_type proto) |
| 153 | { |
| 154 | if (proto == proto_type::tcp) |
| 155 | { |
| 156 | return std::make_shared<AFCTCPClient>(this, &AFCNetClientService::OnNetMsg, &AFCNetClientService::OnNetEvent); |
| 157 | } |
| 158 | else if (proto == proto_type::udp) |
| 159 | { |
| 160 | // for now, do not support udp server |
| 161 | } |
| 162 | else if (proto == proto_type::ws) |
| 163 | { |
| 164 | // will add web-socket server |
| 165 | } |
| 166 | |
| 167 | // other protocol will be supported |
| 168 | return nullptr; |
| 169 | } |
| 170 | |
| 171 | void AFCNetClientService::LogServerInfo() |
| 172 | { |
nothing calls this directly
no outgoing calls
no test coverage detected