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

Method SendPacket

src/Nazara/Network/UdpSocket.cpp:270–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268 */
269
270 bool UdpSocket::SendPacket(const IpAddress& to, const NetPacket& packet)
271 {
272 std::size_t size = 0;
273 const UInt8* ptr = static_cast<const UInt8*>(packet.OnSend(&size));
274 if (!ptr)
275 {
276 m_lastError = SocketError_Packet;
277 NazaraError("Failed to prepare packet");
278 return false;
279 }
280
281 return Send(to, ptr, size, nullptr);
282 }
283
284 /*!
285 * \brief Operation to do when closing socket

Callers

nothing calls this directly

Calls 1

OnSendMethod · 0.80

Tested by

no test coverage detected