1 #include <unistd.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <sys/time.h> 5 #include <sys/types.h> 6 #include <sys/socket.h> 7 #include <netinet/in.h> 8 #include <arpa/inet.h> 9 main(int argc,char * argv[])10int main(int argc, char *argv[]) 11 { 12 int connres; 13 socklen_t connressize = sizeof(connres); 14 int res, sockfd = 0; 15 16 res = getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &connres, &connressize); 17 18 return 0; 19 } 20 21