这是我到目前为止所拥有的
socklen_t cli_size;
struct sockaddr cli;
int in_sock;
/* event from TCP server socket, new connection */
cli_size = sizeof(cli);
try {
if ((in_sock = ::accept(handle,&cli, &cli_size)) < 0) {
throw in_sock;
return NULL;
}
}
catch(int ex) {
cout << "Exception Nr. " << ex << endl;
}
从手册页:
出错时,返回 -1,并适当设置 errno。
问题:我还是不明白errno在哪里?我需要了解异常