当前位置:网站首页>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
边栏推荐
- Constructing expression binary tree with prefix expression
- 语义分割实验:Unet网络/MSRC2数据集
- Error modulenotfounderror: no module named 'cv2 aruco‘
- ABAP table lookup program
- Interviewer: is acid fully guaranteed for redis transactions?
- GPS数据格式转换[通俗易懂]
- Knowledge representation (KR)
- Learn JVM garbage collection 05 - root node enumeration, security points, and security zones (hotspot)
- Learn JVM garbage collection 02 - a brief introduction to the reference and recycling method area
- Understand kotlin from the perspective of an architect
猜你喜欢
Interviewer: is acid fully guaranteed for redis transactions?
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
Matlab imoverlay function (burn binary mask into two-dimensional image)
The evolution of mobile cross platform technology
July Huaqing learning-1
Read and understand the rendering mechanism and principle of flutter's three trees
Average lookup length when hash table lookup fails
C language structure is initialized as a function parameter
Redis highly available sentinel mechanism
- [email protected] (using password"/>
Solve the error 1045 of Navicat creating local connection -access denied for user [email protected] (using password
随机推荐
What is digital existence? Digital transformation starts with digital existence
The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation
ACID事务理论
Image hyperspectral experiment: srcnn/fsrcnn
嵌入式软件架构设计-消息交互
Why do you always fail in automated tests?
ZABBIX agent2 monitors mongodb nodes, clusters and templates (official blog)
Matlab struct function (structure array)
MySQL transaction
Redis highly available sentinel cluster
struct MySQL
手机 CPU 架构类型了解
Get data from the database when using JMeter for database assertion
PXE启动配置及原理
NPM install reports an error
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter
Handwriting blocking queue: condition + lock
Ecplise development environment configuration and simple web project construction
Check the debug port information in rancher and do idea remote JVM debug
MySQL storage engine