I have a BSD socket created with following code (it's in external library that I cannot change):
fcntl(sock, F_SETFL, O_NONBLOCK);
connect(sock, (struct sockaddr*) &sin, sizeof(sin))
What I can do to get a notification from Cocoa that connection is established? In regular world I would make select(3) and test for writability but this either blocks or requires polling (or I need a thread)
I tried with NSFileFandle
but this only allows me to test if there are new data available not that connection is ready for writing.