SFML community forums

Help => Network => Topic started by: firepro20 on December 01, 2019, 07:42:52 pm

Title: Sending multiple packets simultaneously UDP
Post by: firepro20 on December 01, 2019, 07:42:52 pm
Is it possible to send two packets simultaneously in UDP?

Quote
   playerData << playerXPosition << playerYPosition << bulletPtr->isAlive() << bulletPtr->getLocation().x << bulletPtr->getLocation().y;
   bulletData << bulletPtr->isAlive() << bulletPtr->getLocation().x << bulletPtr->getLocation().y;
   socket.send(playerData, sender, port);
   socket.send(bulletData, sender, port);
Title: Re: Sending multiple packets simultaneously UDP
Post by: eXpl0it3r on December 02, 2019, 07:38:52 am
No, but if you want to send the data at once, just pack it all into one Packet.
Title: Re: Sending multiple packets simultaneously UDP
Post by: firepro20 on December 04, 2019, 12:55:42 am
Got it thanks!