c++ - Handling windows socket error -


i retrieving data socket using following code

iresult =  recv(socket,data_array,sizeof(data_array),0); 

now documentation states if recv succefull return no. of bytes retrieved otherwise return error code. how check error code. mean if data retrieved same amount value of error code.

check this link more detail.

basically, when error occurs, socket_error (-1) gets returned, , have call wsagetlasterror(), or read errno or other platform-specific equivalent, specific error code.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -