![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Unix网络编程
CheckOverMe
这个作者很懒,什么都没留下…
展开
-
原始套接字
原始套接字提供普通的TCP和UDP所不提供的能力 可以读写ICMPv4,IGMPv4和ICMPv6等分组。这个能力使得使用ICMP和IGMP构筑的应用程序能够完全作为用户进程处理。 可以读写内核不处理其协议字段的IPv4数据报。大多数内核仅仅处理IP协议字段为1(ICMP),2(IGMP),6(TCP),和17(UDP)的数据报。 有了原始套接字,进程还可以使用IP_HDRINCL套接字选项自行...原创 2020-03-21 15:43:11 · 201 阅读 · 0 评论 -
TCP套接字函数
1. socket函数 #include <sys/socket.h> int socket(int family, int type, int protocol); //若成功则返回非负描述符 //若出错返回-1 2.connect函数 #include <sys/socket.h> int connect(int sockfd, const struct sockad...原创 2020-02-26 09:52:31 · 183 阅读 · 0 评论