当前位置:网站首页>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
边栏推荐
- 自动化测试生命周期
- Redis's memory elimination mechanism, read this article is enough.
- Want to ask, how to choose a securities firm? Is it safe to open an account online?
- Semantic segmentation experiment: UNET network /msrc2 dataset
- MySQL basic operation -dql
- Read and understand the rendering mechanism and principle of flutter's three trees
- July Huaqing learning-1
- Redis highly available sentinel mechanism
- 一款新型的智能家居WiFi选择方案——SimpleWiFi在无线智能家居中的应用
- PXE startup configuration and principle
猜你喜欢
ABAP table lookup program
Take you two minutes to quickly master the route and navigation of flutter
How to clear floating?
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
Master the new features of fluent 2.10
Solve the problem of cache and database double write data consistency
Why do you always fail in automated tests?
ZABBIX ODBC database monitoring
Seven ways to achieve vertical centering
Learn memory management of JVM 01 - first memory
随机推荐
GPS数据格式转换[通俗易懂]
ABAP table lookup program
MySQL installation, Windows version
MySQL transaction
Redis highly available slice cluster
Intern position selection and simplified career development planning in Internet companies
MySQL function
一款新型的智能家居WiFi选择方案——SimpleWiFi在无线智能家居中的应用
Constructing expression binary tree with prefix expression
Redis clean cache
Average lookup length when hash table lookup fails
Knowledge representation (KR)
7月华清学习-1
Why do you always fail in automated tests?
MySQL index - extended data
The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
Hexadecimal conversion summary
Learn garbage collection 01 of JVM -- garbage collection for the first time and life and death judgment
MySQL splits strings for conditional queries
A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"