socket Note

Returns the value of the socket is a file descriptor, SOCKET type itself is defined as an int, since it is the file descriptor, then the system will be treated as a file, and 0,1,2 respectively standard input, standard output , standard error. So are other open file descriptors is greater than 2, -1 if an error is returned. INVALID_SOCKET also defined here as -1

Guess you like

Origin www.cnblogs.com/xjyxp/p/11294261.html