We're developing a cross-platform network application that needs to send and receive data over TCP. On linux we are using select()
to wait on both send and receive to make sure that the socket is ready. However, on OSX the select for read takes an absurd amount of time to return -- over 20 seconds. select()
isn't timing out -- our timeout is 60 seconds and the data is coming back, it's just ridiculously slow. This only happens for reads, not sends. The network appears to be fine (again, the linux machine on the same network does not seem to have the same issues).
Is anyone aware of any caveats using socket programming in OSX?