网络编程day5

慈云数据 7个月前 (04-23) 技术支持 102 0

目录

使用select实现TCP并发服务器

使用poll实现TCP客户端

UDP实现网络聊天室

服务

ser.h

main.c

func_ser.c

makefile 

客户端

cli.h

main.c

func_cli.c

makfile

 思维导图


使用select实现TCP并发服务器

#include 
int main(int argc, const char *argv[])
{
	//创建套接字
	int sfd=Socket(AF_INET,SOCK_STREAM,0);
	if(sfd
微信扫一扫加客服

微信扫一扫加客服

点击启动AI问答
Draggable Icon