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

Method SendMsg

src/plugin/net/src/AFCTCPServer.cpp:219–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219bool AFCTCPServer::SendMsg(const char* msg, const size_t msg_len, const int64_t& session_id)
220{
221 AFScopeRLock xGuard(rw_lock_);
222 auto session = GetNetSession(session_id);
223 if (session == nullptr)
224 {
225 return false;
226 }
227 else
228 {
229 session->GetSession()->send(msg, msg_len);
230 return true;
231 }
232}
233
234bool AFCTCPServer::AddNetSession(AFTCPSessionPtr session)
235{

Callers

nothing calls this directly

Calls 4

GetHeadLenMethod · 0.80
lengthMethod · 0.80
emptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected