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

Author Topic: Stop receiving packets  (Read 2004 times)

0 Members and 1 Guest are viewing this topic.

Megolas

  • Newbie
  • *
  • Posts: 2
    • View Profile
Stop receiving packets
« on: July 13, 2013, 03:52:05 pm »
Hey,
I currently have a thread in which a UdpSocket is receiving packets - is there a way to stop it so I can safely close the program with the thread stopped? Would there be a delay if I would send myself a packet for it to stop?
Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Stop receiving packets
« Reply #1 on: July 13, 2013, 04:20:07 pm »
You can't stop a SFML socket which is waiting. You should either switch it to non-blocking, or use a timeout.
Laurent Gomila - SFML developer