![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络
青空BUG
这个作者很懒,什么都没留下…
展开
-
Linux C实现的在线词典(基于TCP)
基本功能注册登录查询查看查询记录源码#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sqlite3.h>#include <sys/socket.h>#include <netinet/in.h>#include <arpa/inet.h>#define原创 2017-08-01 14:49:18 · 2154 阅读 · 0 评论 -
Linux之UDP SOCKET 编程
基本的UDP编程1.UDP编程框架首先我们需要知道UDP到底是什么,有什么特点? UDP(user datagram protocol)的中文叫用户数据报协议,属于传输层。UDP是面向非连接的协议,它不与对方建立连接,而是直接把我要发的数据报发给对方。所以UDP适用于一次传输数据量很少、对可靠性要求不高的或对实时性要求高的应用场景。正因为UDP无需建立类如三次握手的连接,而使得通信效率很高。U转载 2017-07-26 17:14:42 · 341 阅读 · 0 评论 -
多人聊天室(基于Linux的SOCKET UDP编程)
主要结构体client端:typedef struct{ char type; char name[32]; char text[N];}MSG;type: 用于存放用户状态 name[32]: 用户昵称 text[N]:用户键入的文本内容server端:typedef struct{ char type; char name[32]; ch原创 2017-07-26 22:51:45 · 1750 阅读 · 0 评论 -
用C语言实现TFTP的简单功能(基于TCP)
程序源码结构体struct msg { int type; int flag; char buf[64]; char fname[15]; }; type:用于标识是显示内容,上传或下载 buf:用于存储文件内容 fname:用于存储文件名客户端源码:#include<stdio.h>#include<sys/types.h>#include<s原创 2017-07-28 14:02:13 · 4480 阅读 · 0 评论