Sample example is syntactically wrong. Here is at least a compiling errors/warnings free example.
Also i have a question to
DarkSnow.
Can you explain this one:
Quote:
/* This function will return true if the state (buffer content) have changed within the last recieve or the timeout, where timeout is a value in чSeconds, (1 sec =1000000 чsec). Use to check if new data is in your socket. */
|
I don't get how one function can return true or timeout. Or will timeout be greater than 0, and true is less then 0? Your source code does not cover/use this feature.
Also i don't understand wether socket_change() wait for timeout interval (is it a sync function?) until it gets some data or it's non sync function and you must call it in loop until it returns true or timeout interval which was passed as a second argument (_timeout)?