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

Author Topic: UDP Disconnect  (Read 1900 times)

0 Members and 1 Guest are viewing this topic.

naret

  • Newbie
  • *
  • Posts: 1
    • View Profile
UDP Disconnect
« on: December 11, 2013, 07:00:24 am »
I'm a bit confused about the way UDP is handled.
I have several clients 'connected' to to my server, basically just a 'bind' and then sending data to the specific ip:port. once a client is shut down,  Socket.receive on the server side returns "disconnected". how is that even possible in UDP? the ip and port is 0 and "send" to the 'disconnected' client returns sf::Socket::Done

I have a time out of 10s for clients, afterwards I don't send any data to those closed ports, yet for 10s I kind of get spammed on server side with 'disconnected' messages. seems like send errors are passed to receive errors? Sometimes I also get 'disconnect' messages if another clients connects, the data exchange works flawlessly, but while there is no data, I just receive 'disconnect'.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: UDP Disconnect
« Reply #1 on: December 11, 2013, 07:48:00 am »
Version of SFML?
OS?
Minimal code to reproduce the problem?
Laurent Gomila - SFML developer