MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / CreateNet

Method CreateNet

src/plugin/net/src/AFCNetClientService.cpp:152–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152std::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
171void AFCNetClientService::LogServerInfo()
172{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected