-
is a socket writable
How can i find out if a socket if writable?
I am programming for windows.
I would like the easiest solution(Dont need to be portable, i love windows :D )
If you plan to reffer to the select() function, i have looked it up on MSDN , and
1. I did not understand it
2. It looks like a overkill for this little task
-
You're implying a an active socket (connected) correct? In that case, select() is a good solution.
Kuphryn
-
How about something like:
Code:
if((socket != NULL) && (socket != SOCKET_ERROR) && (socket != INVALID_SOCKET))
:confused:
-
That wont work. The only way to tell (that I know of) whether you can write to a socket is to call select(). You can find an example at http://www.ecst.csuchico.edu/~beej/g...et_old/#select