网络编程
void*_
这个作者很懒,什么都没留下…
展开
-
Socket网络编程判断客户端是否在线
Linux环境下编写的 TCP 服务器,当客户端断开连接时,使用 select 函数的情况下,服务器仍然会接收到一个信号, select 函数会将这个设备描述符标记为可读/写,然后服务器端调用 recv 函数,若 recv 函数返回值为 0,则表示客户端已经断开,服务器需要将对应的 Socket 套接字关闭掉,让数据写回磁盘,并释放文件所占用的资源。...原创 2019-04-16 09:34:02 · 3220 阅读 · 0 评论 -
Socket之UDP服务器代码框架
server#include <stdio.h>#include <sys/types.h>#include <sys/socket.h>#include <netinet/in.h>#include <string.h>#include <unistd.h>#include <arpa/inet.h&...原创 2019-04-16 10:25:09 · 248 阅读 · 0 评论 -
Socket之TCP/IP服务器代码框架
server#include <stdio.h>#include <sys/types.h> #include <sys/socket.h>#include <arpa/inet.h>#include <stdlib.h>/*TCP服务器创建*/int main(int argc,char **argv){ i...原创 2019-04-17 09:43:29 · 473 阅读 · 0 评论 -
UDP 单播、广播、多播
https://blog.csdn.net/xiaolei251990/article/details/84562327原创 2019-06-19 09:34:42 · 510 阅读 · 0 评论 -
TCP/IP图解
原创 2019-10-05 14:59:55 · 165 阅读 · 0 评论