ASYNC - Used by both client and server to write validation packet
| 584 | |
| 585 | // ASYNC - Used by both client and server to write validation packet |
| 586 | void WriteValidation() |
| 587 | { |
| 588 | asio::async_write(m_socket, asio::buffer(&m_nHandshakeOut, sizeof(uint64_t)), |
| 589 | [this](std::error_code ec, std::size_t length) |
| 590 | { |
| 591 | if (!ec) |
| 592 | { |
| 593 | // Validation data sent, clients should sit and wait |
| 594 | // for a response (or a closure) |
| 595 | if (m_nOwnerType == owner::client) |
| 596 | ReadHeader(); |
| 597 | } |
| 598 | else |
| 599 | { |
| 600 | m_socket.close(); |
| 601 | } |
| 602 | }); |
| 603 | } |
| 604 | |
| 605 | void ReadValidation(olc::net::server_interface<T>* server = nullptr) |
| 606 | { |
nothing calls this directly
no outgoing calls
no test coverage detected