
网络编程
pisuto
这个作者很懒,什么都没留下…
展开
-
网络编程 4、libevent简易聊天室
libevent简易聊天室 参考链接: 服务器: /* * The MIT License (MIT) * Copyright (c) 2011 Jason Ish * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to de.原创 2021-03-18 20:02:11 · 298 阅读 · 0 评论 -
网络编程 3、应用Reactor模式的简单epoll服务器
libevent雏形 参考链接:https://github.com/aceld/libevent/blob/master/32_epollde_fan_ying_dui_mo_shi_shi_xian.md 代码及注释如下: #include <stdlib.h> #include <stdio.h> #include <stdio.h> #include <sys/socket.h> #include <sys/epoll.h>原创 2021-02-09 14:43:48 · 220 阅读 · 1 评论 -
网络编程 2、简单客户端
简单客户端 参考链接:https://github.com/aceld/libevent/blob/master/26-%E7%AE%80%E5%8D%95%E7%9A%84epoll%E6%9C%8D%E5%8A%A1%E5%99%A8.md 编译及运行参考上一篇 简单服务器 编译。 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string.h>..原创 2021-02-09 14:37:02 · 158 阅读 · 0 评论 -
网络编程 1、简单服务器epoll实现
简单服务器 参考链接:https://github.com/aceld/libevent/blob/master/26-%E7%AE%80%E5%8D%95%E7%9A%84epoll%E6%9C%8D%E5%8A%A1%E5%99%A8.md 编译及执行操作。 #编译及运行 gcc server.c -o server ./server 代码带有注释,参考注释即可。 #include <stdio.h> #include <stdlib.h> #inclu..原创 2021-02-09 14:33:04 · 177 阅读 · 0 评论