| 194 | } |
| 195 | |
| 196 | bool AFCWebSocketClient::SendMsg(const char* msg, const size_t msg_len, const AFGUID& session_id /* = 0*/) |
| 197 | { |
| 198 | using namespace brynet::net::http; |
| 199 | |
| 200 | auto frame = std::make_shared<std::string>(); |
| 201 | WebSocketFormat::wsFrameBuild(msg, msg_len, *frame, WebSocketFormat::WebSocketFrameType::BINARY_FRAME, true, false); |
| 202 | |
| 203 | if (client_session_ptr_->GetSession() != nullptr) |
| 204 | { |
| 205 | client_session_ptr_->GetSession()->send(frame); |
| 206 | } |
| 207 | |
| 208 | return true; |
| 209 | } |
| 210 | |
| 211 | bool AFCWebSocketClient::CloseSession(const AFGUID& session_id) |
| 212 | { |
nothing calls this directly
no outgoing calls
no test coverage detected