请部一下这段代码是什么意思 比如说这个serveraddr.sin_family 中间那个点儿是分开两边的意思?server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);serveraddr.sin_family = AF_INET;serveraddr.sin_port = htons(port);serveraddr

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 15:58:15

请部一下这段代码是什么意思 比如说这个serveraddr.sin_family 中间那个点儿是分开两边的意思?server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);serveraddr.sin_family = AF_INET;serveraddr.sin_port = htons(port);serveraddr
请部一下这段代码是什么意思 比如说这个serveraddr.sin_family 中间那个点儿是分开两边的意思?
server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
serveraddr.sin_family = AF_INET;
serveraddr.sin_port = htons(port);
serveraddr.sin_addr.S_un.S_addr = htonl(INADDR_ANY);

请部一下这段代码是什么意思 比如说这个serveraddr.sin_family 中间那个点儿是分开两边的意思?server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);serveraddr.sin_family = AF_INET;serveraddr.sin_port = htons(port);serveraddr
类成员啊 serveraddr好比班级,就像sin_family好比班级中的某一个学生