MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / TcpServer

Method TcpServer

src/Core/Network/TcpServer.cpp:7–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace obe::Network
6{
7 TcpServer::TcpServer(Triggers::TriggerManager& triggers, unsigned short port,
8 std::string triggerNamespace, std::string triggerGroup)
9 {
10 if (!triggerNamespace.empty())
11 {
12 m_socketTriggers
13 = triggers.createTriggerGroup(triggerNamespace, triggerGroup);
14 m_socketTriggers->add("DataReceived").add("Connected").add("Disconnected");
15 }
16 m_listener.setBlocking(false);
17 m_listener.listen(port);
18
19 m_clients.push_back(std::make_unique<sf::TcpSocket>());
20 m_data.resize(m_maxBufferSize);
21 }
22
23 void TcpServer::update()
24 {

Callers

nothing calls this directly

Calls 5

createTriggerGroupMethod · 0.80
resizeMethod · 0.80
emptyMethod · 0.45
addMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected