随笔分类 -  网络编程

libevent学习笔记-使用指导
摘要:windows下Code::Blocks建立GNU编译的工程:1、需要添加如下头文件:D:\E\programing\levent-libevent\includeD:\E\programing\levent-libevent\gnu\includeC:\Program Files\Dev-Cpp\... 阅读全文
posted @ 2014-04-29 10:43 escoffier 阅读(243) 评论(0) 推荐(0)
非阻塞I/O 复用-conncet
摘要:When a TCP socket is set to nonblocking and then connect is called, connect returns immediately with an error of EINPROGRESS but the TCP three-way han... 阅读全文
posted @ 2014-04-28 16:39 escoffier 阅读(304) 评论(0) 推荐(0)
非阻塞I/O 复用
摘要:By default, sockets are blocking. This means that when we issue a socket call that cannot be completed immediately, our process is put to sleep, waiti... 阅读全文
posted @ 2014-04-26 16:11 escoffier 阅读(374) 评论(0) 推荐(0)
muduo学习笔记-Acceptor类
摘要:Acceptor类一般由TCPServer创建,负责处理客户端发送的connect,它拥有一个acceptSocket_和acceptChannel_成员。1、创建Acceptor :TcpServer::TcpServer(EventLoop* loop,const InetA... 阅读全文
posted @ 2014-04-23 18:00 escoffier 阅读(606) 评论(0) 推荐(1)
epoll学习笔记
摘要:1、epoll_create函数函数声明:int epoll_create(int size)该 函数生成一个epoll专用的文件描述符。它其实是在内核申请一空间,用来存放你想关注的socket fd上是否发生以及发生了什么事件。size就是你在这个epoll fd上能关注的最大socket fd数... 阅读全文
posted @ 2014-04-20 22:50 escoffier 阅读(146) 评论(0) 推荐(0)