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

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -