当前位置:网站首页>UNIX socket advanced learning diary - advanced i/o functions
UNIX socket advanced learning diary - advanced i/o functions
2022-07-05 12:27:00 【yang881221】
1. Socket timeout
a. Use alarm-SIGALARM The signal
b.select Wait in the middle I/O
c. Use the socket option SO_RCVTIMEO,SO_SNDTIMEO.
stay connect and recvfrom Use in alarm
select Set timeout
Use the socket option to modify recvfrom
readv And writev function
Spread reading , Centralized writing
sendmsg,recvmsg
Secondary data
Check the amount of queued data :
Non blocking I/O
MSG_PEEK Peeping data
ioctl FIONREAD
Completely buffered : Buffer full , Process display call fflush, Or process call exit Terminate itself , Usually, it is 8k
The line buffer : Line break encountered , Process call fflush, Or process call exit Terminate itself
No buffer : Every time you call I/O Occurs from time to time I/O
/dev/poll
kqueue
Transaction purpose TCP
边栏推荐
- 强化学习-学习笔记3 | 策略学习
- ZABBIX monitors mongodb templates and configuration operations
- Automated test lifecycle
- ZABBIX agent2 monitors mongodb nodes, clusters and templates (official blog)
- SENT协议译码的深入探讨
- Redis highly available slice cluster
- Select drop-down box realizes three-level linkage of provinces and cities in China
- Deep discussion on the decoding of sent protocol
- Learn JVM garbage collection 05 - root node enumeration, security points, and security zones (hotspot)
- [HDU 2096] 小明A+B
猜你喜欢
什么是数字化存在?数字化转型要先从数字化存在开始
Detailed steps for upgrading window mysql5.5 to 5.7.36
嵌入式软件架构设计-消息交互
About cache exceptions: solutions for cache avalanche, breakdown, and penetration
ABAP table lookup program
Matlab superpixels function (2D super pixel over segmentation of image)
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
Matlab struct function (structure array)
Get data from the database when using JMeter for database assertion
Understand redis persistence mechanism in one article
随机推荐
Array cyclic shift problem
Error modulenotfounderror: no module named 'cv2 aruco‘
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
Video networkState 属性
How to clear floating?
Yum only downloads the RPM package of the software to the specified directory without installing it
Resnet18 actual battle Baoke dream spirit
Matlab imoverlay function (burn binary mask into two-dimensional image)
Design of music box based on assembly language
POJ-2499 Binary Tree
Instance + source code = see through 128 traps
Learning JVM garbage collection 06 - memory set and card table (hotspot)
Matlab label2idx function (convert the label matrix into a cell array with linear index)
Detailed structure and code of inception V3
Summary of C language learning problems (VS)
Is investment and finance suitable for girls? What financial products can girls buy?
MySQL installation, Windows version
The evolution of mobile cross platform technology
自动化测试生命周期
The solution of outputting 64 bits from printf format%lld of cross platform (32bit and 64bit)