
网络基础
happyForever~
这个作者很懒,什么都没留下…
展开
-
回环服务器_5.epoll
使用epoll实现/* * server.cpp * * Created on: 2021年11月13日 * Author: LENOVO */#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h>#include原创 2021-11-13 18:20:59 · 2109 阅读 · 0 评论 -
回环服务器_4.poll
使用poll函数实现/* * server.cpp * * Created on: 2021年11月13日 * Author: LENOVO */#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h>#include原创 2021-11-13 17:52:40 · 70 阅读 · 0 评论 -
回环服务器_3.select
用slect()实现IO多路复用的回环服务器/* * server.cpp * * Created on: 2021年11月13日 * Author: LENOVO */#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/socket.h&原创 2021-11-13 15:24:22 · 2075 阅读 · 0 评论 -
回环服务器_2.线程
回环服务器,为每个连接创建一个线程实现数据的交互server.cpp/* * server.cpp * * Created on: 2021年11月13日 * Author: LENOVO */#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <原创 2021-11-13 14:59:30 · 564 阅读 · 0 评论 -
回环服务器_1.初级
简单的回环服务器,端口号8888server.cpp/* * server.cpp * * Created on: 2021年11月13日 * Author: LENOVO */#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/sock原创 2021-11-13 14:38:15 · 746 阅读 · 0 评论