当前位置:网站首页>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
边栏推荐
- MySQL storage engine
- The survey shows that traditional data security tools cannot resist blackmail software attacks in 60% of cases
- 嵌入式软件架构设计-消息交互
- About cache exceptions: solutions for cache avalanche, breakdown, and penetration
- Error modulenotfounderror: no module named 'cv2 aruco‘
- Pytoch uses torchnet Classerrormeter in meter
- Cypher syntax of neo4j graph database
- A guide to threaded and asynchronous UI development in the "quick start fluent Development Series tutorials"
- Implementing Yang Hui triangle with cyclic queue C language
- Master-slave mode of redis cluster
猜你喜欢

16 channel water lamp experiment based on Proteus (assembly language)

MySQL transaction

The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation

Take you hand in hand to develop a service monitoring component

MySQL index (1)

什么是数字化存在?数字化转型要先从数字化存在开始

Solve the problem of cache and database double write data consistency
![[figure neural network] GNN from entry to mastery](/img/e2/bb045fb03bc255b8659f9ca7cdd26b.jpg)
[figure neural network] GNN from entry to mastery

Check the debug port information in rancher and do idea remote JVM debug
Automated test lifecycle
随机推荐
MySQL data table operation DDL & data type
Course design of compilation principle --- formula calculator (a simple calculator with interface developed based on QT)
Learn garbage collection 01 of JVM -- garbage collection for the first time and life and death judgment
MySQL regular expression
Handwriting blocking queue: condition + lock
The solution of outputting 64 bits from printf format%lld of cross platform (32bit and 64bit)
[superhard core] is the core technology of redis
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
ZABBIX monitors mongodb templates and configuration operations
How to design an interface?
What is the difference between canvas and SVG?
struct MySQL
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter
Matlab label2idx function (convert the label matrix into a cell array with linear index)
Resnet18 actual battle Baoke dream spirit
Image hyperspectral experiment: srcnn/fsrcnn
Correct opening method of redis distributed lock
Application of a class of identities (vandermond convolution and hypergeometric functions)
Just a coincidence? The mysterious technology of apple ios16 is actually the same as that of Chinese enterprises five years ago!
Pytoch uses torchnet Classerrormeter in meter