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

Author Topic: timeout when receiving  (Read 4000 times)

0 Members and 1 Guest are viewing this topic.

gsaurus

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • Evolution Engine
timeout when receiving
« on: September 04, 2011, 09:04:42 pm »
When a (Udp)Socket is on blocking mode, is there a way to set a timeout when receiving?
The only way I currently see is using a SocketSelector around it to wait with a timeout.
Pluma - Plug-in Management Framework

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
timeout when receiving
« Reply #1 on: September 04, 2011, 09:09:35 pm »
I think it's the only way to do it (I mean with SFML).
Laurent Gomila - SFML developer

gsaurus

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • Evolution Engine
timeout when receiving
« Reply #2 on: September 04, 2011, 09:13:32 pm »
Well it's ok, it's just a little strange to use a multiplexer when I just need to wait for one socket.
Pluma - Plug-in Management Framework

gsaurus

  • Sr. Member
  • ****
  • Posts: 262
    • View Profile
    • Evolution Engine
timeout when receiving
« Reply #3 on: September 05, 2011, 01:04:20 pm »
Also, what does this mean on the udp receive function taking a packet?
Quote
Warning: this functon doesn't properly handle mixed data received from multiple peers
Pluma - Plug-in Management Framework

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
timeout when receiving
« Reply #4 on: September 05, 2011, 01:56:45 pm »
It's not relevant anymore, I should remove this line from the documentation.
Laurent Gomila - SFML developer

  • Guest
timeout when receiving
« Reply #5 on: September 29, 2011, 01:02:52 pm »
>I am using the a callback function in the following code to receive the
> response from a HTTP POST. The majority of the time it works. I have run
> into a case where I have not received a response back for some reason, and I
> dont know why. Now my process is stuck in a loop waiting for a response. Is
> there some option that I can set so that the read will timeout when trying
> to recieve the response??

Cegonsoft
_________________________
Cegonsoft foundation

 

anything