| 402 | */ |
| 403 | |
| 404 | bool TcpClient::SendPacket(const NetPacket& packet) |
| 405 | { |
| 406 | std::size_t size = 0; |
| 407 | const UInt8* ptr = static_cast<const UInt8*>(packet.OnSend(&size)); |
| 408 | if (!ptr) |
| 409 | { |
| 410 | m_lastError = SocketError_Packet; |
| 411 | NazaraError("Failed to prepare packet"); |
| 412 | return false; |
| 413 | } |
| 414 | |
| 415 | return Send(ptr, size, nullptr); |
| 416 | } |
| 417 | |
| 418 | /*! |
| 419 | * \brief Sets the position of the cursor |
no test coverage detected