openframeworks/openFrameworks — pull request #2519 by trentbrooks (2013-08-28 00:29:06+00:00)
Title: Feature tcpmanager connect timeout

Hi, I haven't submitted a PR before- so let me know when I'm off track, and if the coding style is wrong. I opened an issue here https://github.com/openframeworks/openFrameworks/issues/2515 which describes the problem.

I have set the connect timeout to 5 seconds by default. Not sure what the preferred time should be (and whether to use a #define for this)? But having no timeout, eg. OF_TCP_DEFAULT_TIMEOUT is not recommended as this would not solve the issue (blocking for 90 seconds then crashing when connecting to invalid ip).

I have only tested on OSX.

Thanks OF,
Trent