
网络编程
buyicn
生于江汉平原,求学于山水甲天下之地,学毕,遂混迹于珠三角,至今已数年。于世间已四十几载,倍觉光阴似箭,人事来也匆匆,去亦匆匆。怀淡定之心,持宁静之态,专心耕耘,孜孜不倦。
古今之成大事业、大学问者,必经过三种之境界:
“昨夜西风凋碧树,独上高楼,望尽天涯路。”此第一境也。
“衣带渐宽终不悔,为伊消得人憔悴。”此第二境也。
“众里寻他千百度,蓦然回首,那人却在灯火阑珊处。”此第三境也。
(王国维《人间词话》)
“本分就是要做对的事情和要把事情做对。平常心就是回到事物本源的心态,也就是要努力认清什么是对的事情,认清事物的本质。”(段永平)
展开
-
TCP和UDP的Client-Server交互流程
1.TCP Client-Server交互流程2.UDP Client-Server交互流程注:图片来源(https://www.cs.dartmouth.edu/~campbell/cs60/socketprogramming.html#x1-100013)。3.一个形象的比喻建立TCP连接就像是一个电话系统。socket():你有了一部手机。bind():激活SIM卡...原创 2019-07-03 09:04:37 · 3571 阅读 · 0 评论 -
网络编程(socket C语言编程)
socket C语言编程,看似简单,一个客户端,一个服务端。可是遇到阻塞时,怎么办?需要异步处理,你会吗?没关系,我们可以学习。下面是一些不错的网络编程的资源。(1)https://beej.us/guide/bgnet/Beej's Guide to Network ProgrammingUsing Internet Sockets这是网络编程的非常好的教材!极力推荐。...原创 2019-03-09 17:53:55 · 2482 阅读 · 0 评论 -
“sys/epoll.h”代码
推荐阅读“sys/epoll.h”代码,有助于理解epoll函数的用法。Browse the source code of glibc/sysdeps/unix/sysv/linux/sys/epoll.h/* Copyright (C) 2002-2019 Free Software Foundation, Inc. This file is part of the GNU C L...原创 2019-07-16 08:18:03 · 5188 阅读 · 0 评论 -
Linux epoll和应用实例
1.高性能网路服务器编程用什么技术?Unix/Linux平台:epollWindows平台:IOCP2.Linux的epoll函数epoll用到三个函数:int epoll_create(int size);int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);int epoll_wait(int...原创 2019-07-14 11:11:10 · 1063 阅读 · 0 评论 -
Linux epoll的参考实例
说明:本文转载自:https://byteandbits.blogspot.com/2013/08/tcp-echo-server-using-epoll-example-for.html为了便于阅读,整理了代码的格式。Description:Implementation of tcp echo server using epoll. The server accepts connect...转载 2019-07-16 11:41:22 · 1660 阅读 · 0 评论 -
man epoll指南节选
在linux终端通过命令:man epoll可查看epoll的编程指南。其中以下内容值得重点学习。Example for suggested usageWhile the usage of epoll when employed as a level-triggered interface does have the same semantics as poll(2),the edg...转载 2019-07-16 14:53:07 · 637 阅读 · 0 评论 -
Linux epoll API概述
大家是不是想知道,当我们在用户空间调用linux epoll的三个函数int epoll_create(int size);int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);int epoll_wait(int epfd, struct epoll_event *events, int maxevents, ...转载 2019-07-17 09:10:18 · 435 阅读 · 0 评论 -
Linux epoll函数图解
看到一篇不错的文章《The method to epoll's madness》(作者:Cindy Sridharan)(原文链接)。下面是摘录:epollstands forevent polland is a Linux specific construct. It allows for a process to monitor multiple file descriptors...转载 2019-07-17 11:02:59 · 402 阅读 · 0 评论