Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Should you use one UDP Socket for sending and receiving?  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

FleshyOverlord

  • Newbie
  • *
  • Posts: 22
    • View Profile
Should you use one UDP Socket for sending and receiving?
« 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 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Should you use one UDP Socket for sending and receiving?
« Reply #1 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 ;)
Laurent Gomila - SFML developer

 

anything