MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / SendPacket

Method SendPacket

src/Nazara/Network/TcpClient.cpp:404–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

UdpSocket.cppFile · 0.45
TCP.cppFile · 0.45

Calls 1

OnSendMethod · 0.80

Tested by

no test coverage detected