| 217 | } |
| 218 | |
| 219 | bool 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 | |
| 234 | bool AFCTCPServer::AddNetSession(AFTCPSessionPtr session) |
| 235 | { |
nothing calls this directly
no test coverage detected