what if Poco StreamSocket.available() returns 0? -



what if Poco StreamSocket.available() returns 0? -

what situation streamsocket.available() homecoming 0?

what should within case? should close connection, or ignore it? there guess scheme busy leading 0 bytes returned streamsocket.

what should depends on logic of application. if available() returns 0 , expect data, means has not yet arrived , may want maintain on inquiring or phone call receivebytes() (which, if socket in blocking mode, block until info arrives). if receivebytes() returns 0, remote end has closed or reset connection , should drop it, too.

poco-libraries

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -