当前位置:网站首页>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
边栏推荐
- The evolution of mobile cross platform technology
- Semantic segmentation experiment: UNET network /msrc2 dataset
- Read and understand the rendering mechanism and principle of flutter's three trees
- 图像超分实验:SRCNN/FSRCNN
- Seven polymorphisms
- Migrate data from Mysql to neo4j database
- Learn garbage collection 01 of JVM -- garbage collection for the first time and life and death judgment
- Leetcode-1. Sum of two numbers (Application of hash table)
- MVVM framework part I lifecycle
- Redis highly available slice cluster
猜你喜欢

Redis clean cache

The relationship between the size change of characteristic graph and various parameters before and after DL convolution operation
Why do you always fail in automated tests?

Flutter2 heavy release supports web and desktop applications

Take you hand in hand to develop a service monitoring component

Matlab imoverlay function (burn binary mask into two-dimensional image)

Third party payment interface design

Ecplise development environment configuration and simple web project construction

Average lookup length when hash table lookup fails

Redis's memory elimination mechanism, read this article is enough.
随机推荐
Flutter2 heavy release supports web and desktop applications
How to clear floating?
GNN(pytorch-geometric)
Seven ways to achieve vertical centering
One article tells the latest and complete learning materials of flutter
Is investment and finance suitable for girls? What financial products can girls buy?
Learn the memory management of JVM 02 - memory allocation of JVM
Correct opening method of redis distributed lock
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter
Pytorch two-layer loop to realize the segmentation of large pictures
Mmclassification training custom data
Redis highly available sentinel mechanism
Anaconda creates a virtual environment and installs pytorch
What is digital existence? Digital transformation starts with digital existence
MVVM framework part I lifecycle
MySQL multi table operation
Check the debug port information in rancher and do idea remote JVM debug
信息服务器怎么恢复,服务器数据恢复怎么弄[通俗易懂]
Get all stock data of big a
Get data from the database when using JMeter for database assertion