SFML community forums

Help => Network => Topic started by: FleshyOverlord on January 17, 2020, 04:52:56 am

Title: Should you use one UDP Socket for sending and receiving?
Post by: FleshyOverlord on January 17, 2020, 04:52:56 am
Hello, I have a general question pertaining to SFML's networking. I read in one post that one UDP socket should not be used for both sending and receiving (I might have interpreted this incorrectly: https://en.sfml-dev.org/forums/index.php?topic=22917.0 (https://en.sfml-dev.org/forums/index.php?topic=22917.0) 4th post by Laurent). Is this true, or is it a good idea to stick to using one UDP socket for sending and receiving in SFML's architecture?
Title: Re: Should you use one UDP Socket for sending and receiving?
Post by: Laurent on January 17, 2020, 08:39:57 am
Again, it depends what you're doing with the socket, and how you're using it.

There's never is single good solution for networking, there are many ways to achieve the same goal. Don't be afraid to try things. Use a single socket if you don't see why you shouldn't, and either it will work fine, or you'll stumble across the reason why it's not such a good idea in your case. But by exploring by yourself, you'll understand networking much better than by applying random advices found on a forum ;)