Linux
文章平均质量分 60
wellhead
用心修行
知行合一
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
有关套接口操作函数(经常忘掉里头一些细节,留着查看)
13.2.2 socket函数socket函数的具体信息如表13.1所示。表13.1 socket函数头文件函数形式int socket(int domain, int type, int protocol转载 2009-09-02 17:10:00 · 1076 阅读 · 0 评论 -
epoll在ET模式下的一些注意事项
man中给出了epoll的用法,example如下: for(;;) { nfds = epoll_wait(kdpfd, events, maxevents, -1); for(n = 0; n if(events[n].data.fd == listener) { client原创 2009-09-02 15:15:00 · 2073 阅读 · 0 评论 -
PROCESS STATE CODES
Here are the different values that the s, stat and state output specifiers(header "STAT" or "S") will display to describe the state of a process.D Uninterruptible sleep (usually IO)R Running or转载 2009-09-03 15:29:00 · 421 阅读 · 0 评论 -
lightttpd的一个BUG
static int fdevent_linux_sysepoll_event_get_revent(fdevents *ev, size_t ndx){ int events = 0, e; e = ev->epoll_events[ndx].events; if (e & EPOLLIN) events |= FDEVENT_IN; if (e & EP原创 2009-09-15 10:31:00 · 628 阅读 · 0 评论 -
经常使用的read & write
一旦我们建立了连接,我们的下一步就是进行通信了.在Linux下面把我们前面建立的通道 看成是文件描述符,这样服务器端和客户端进行通信时候,只要往文件描述符里面读写东西了. 就象我们往文件读写一样. 1 写函数write ssize_t write(int fd,const void *buf,size_t nbytes) write函数将buf中的nbytes字节内容写入文件描述符fd.成功原创 2009-09-18 11:40:00 · 643 阅读 · 0 评论
分享