MCPcopy Create free account
hub / github.com/chenshuo/muduo / onStringMessage

Method onStringMessage

examples/asio/chat/server_threaded_efficient.cc:67–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65 typedef std::shared_ptr<ConnectionList> ConnectionListPtr;
66
67 void onStringMessage(const TcpConnectionPtr&,
68 const string& message,
69 Timestamp)
70 {
71 ConnectionListPtr connections = getConnectionList();
72 for (ConnectionList::iterator it = connections->begin();
73 it != connections->end();
74 ++it)
75 {
76 codec_.send(get_pointer(*it), message);
77 }
78 }
79
80 ConnectionListPtr getConnectionList()
81 {

Callers

nothing calls this directly

Calls 4

get_pointerFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected