![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络
求你好好学习
帅气
展开
-
2021-10-06Linux套接字socket编程入门(二)TCP模式回音代码
第一篇的UDP链接服务端代码server_tcp.c:在这里插入代码片#include <stdio.h>#include <string.h>#include <stdlib.h>#include <unistd.h>#include <arpa/inet.h>#include <sys/socket.h>#include <netinet/in.h>#include <errno.h>#d原创 2021-10-06 21:11:10 · 78 阅读 · 0 评论 -
2021-10-06Linux套接字socket编程入门(一)UDP模式回音代码
黄群老师的计算机网络的第一个lab是不算分的,但是国庆很有时间就干脆想试一试,但是发现之前因为没有写过套接字相关代码所以有些困难。参考了黄群老师的客户端\服务器模式下利用套接字编写简单的回音功能的PPT(说实在的那个PPT的代码复制进vim里居然各种格式错误),再加上参考了Linux套接字演示这篇文章,可算实现了第一个套接字网络编程程序。上代码:客户端代码client.c:#include<sys/socket.h>#include<unistd.h>#include&l原创 2021-10-06 20:15:20 · 106 阅读 · 0 评论