-5

My code is: http://ideone.com/nVXIQ.

recv() functions always idling (it works very slow); it takes several seconds to get the result, and recv() should handle quickly such small amount of data.

kiamlaluno
  • 24,790
  • 16
  • 70
  • 85
Secret
  • 2,499
  • 6
  • 29
  • 44
  • 3
    Because I'm too stupid to see that you just created a new user account and re-posted an identical question. – Puppy May 20 '12 at 11:57

1 Answers1

2

Is your question about recv's blocking behavior? If so, then investigate using non-blocking IO with something like a select/poll loop.

moofins
  • 150
  • 2
  • 4
  • no, my question is exactly about recv() work in my code, because I'm not understanding why does it work slow/idle? – Secret May 20 '12 at 00:54
  • @user167908: Why do you think it is slow? How do you know it is slow? Why do you keep using the word "idle"? Only blocking functions cause a program to "idle", and you say this isn't about `recv`'s blocking behavior. – Mooing Duck May 21 '12 at 22:00