socket()函数、bind()函数、listen()函数、accept()函数、read函数
三元组(ip地址,协议,端口)可以标识网络的进程,网络中的进程通信就可以利用这个标志与其它进程进行交互。
socket()函数
int socket(int domain, int type, int protocol);
•domain:即协议域,又称为协议族(family)。常用的协议族有,AF_INET(IPv4)、AF_INET6(IPv6)、AF_LOCAL(或称AF_UNIX,Unix域socket)、AF_ROUTE等等。协议族决定了socket的地址类型,在通信中必须采用对应的地址,如AF_
原创
2020-12-06 17:03:52 ·
683 阅读 ·
0 评论