当前位置:网站首页>Network communication basic kit -- IPv4 socket structure
Network communication basic kit -- IPv4 socket structure
2022-07-04 02:10:00 【Soy sauce;】
1. Network communication solves three problems

2.ipv4 Socket structure
strcut sockaddr Many network programming functions were born before IPv4 agreement , At that time, they all used sockaddr Structure , For forward compatibility , Now? sockaddr Degenerated into (void *) The role of , Pass an address to the function , As for this function is sockaddr_in still sockaddr_in6, Determined by the address family , Then the internal function forces the type to be converted to the required address type .

General socket structure
struct sockaddr {
sa_family_t sa_family; /* address family, AF_xxx */
char sa_data[14]; /* 14 bytes of protocol address */
};
边栏推荐
- Hamburg University of Technology (tuhh) | intelligent problem solving as integrated hierarchical reinforcement learning
- Keep an IT training diary 054- opening and closing
- Is Shengang securities company as safe as other securities companies
- Prose article appreciation - the rain in the warm country has never changed into cold, hard and brilliant flowers. Knowledgeable people think he is monotonous, and he thinks he is unlucky, doesn't he?
- 15. System limitations and options
- How to view the computing power of GPU?
- Life cycle of instance variables, static variables and local variables
- Small program graduation project based on wechat examination small program graduation project opening report function reference
- Applet graduation project based on wechat selection voting applet graduation project opening report function reference
- PMP daily three questions (February 14, 2022)
猜你喜欢

Will the memory of ParticleSystem be affected by maxparticles

Final consistency of MESI cache in CPU -- why does CPU need cache

Openbionics exoskeleton project introduction | bciduino community finishing

Remember a lazy query error

Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
![[software implementation series] software implementation interview questions with SQL joint query diagram](/img/8b/8718fea82f83a6169ea5d8c2e5b645.jpg)
[software implementation series] software implementation interview questions with SQL joint query diagram

1189. Maximum number of "balloons"
![[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)](/img/36/e5b716f2f976eb474b673f85363dae.jpg)
[Yugong series] February 2022 attack and defense world advanced question misc-83 (QR easy)

Maximum likelihood method, likelihood function and log likelihood function

How programmers find girlfriends through blind dates
随机推荐
Applet graduation design is based on wechat course appointment registration. Applet graduation design opening report function reference
LV1 Roche limit
Customize redistemplate tool class
What are the main investment products of bond funds and what are they
Small program graduation design is based on wechat order takeout small program graduation design opening report function reference
Chain ide -- the infrastructure of the metauniverse
Override and virtual of classes in C #
MPLS③
MySQL advanced (Advanced) SQL statement (I)
Huawei cloud micro certification Huawei cloud computing service practice has been stable
Flex flexible layout, box in the middle of the page
14. Process time
Create real-time video chat in unity3d
Jerry's watch listens to the message notification of the target third-party software and pushes the message to the device [article]
Basic editing specifications and variables of shell script
Small program graduation project based on wechat video broadcast small program graduation project opening report function reference
What is the intelligent monitoring system of sewage lifting pump station and does it play a big role
Gee import SHP data - crop image
Summarize the past to motivate yourself to move on
Conditional statements of shell programming