Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the knowledge points related to linux TCP

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains the "linux TCP-related knowledge points", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "what are the linux TCP-related knowledge points"!

1 the maximum number of tcp connections on the server side is about 2 to the 48th power (2.8e)

2. When processing highly concurrent TCP connections, the maximum number of concurrency is limited by the system's limit on the number of files that can be opened simultaneously by a single process (ulimit-n, the number of files that can be opened by query)

When Linux servers interact, there are generally two identities, the client and the server

1) the server initiatively creates a listening socket, binds the external server port port, and then starts listening.

2) when the client wants to communicate with the server, it starts to connect to the port port of the server.

3) the server receives the request from the client, and then generates a new socket.

4), the server and the client communicate on the new socket.

By means of port reuse and adjusting server parameters, it is obvious that the number of TCP connections can be greater than 65535 of TCP port numbers (a single server).

80% average memory usage (warning line).

Int send (SOCKET s, CONST char FAR * buf, int len, int flags)

Both client and server applications use the send function to send data to the other end of the TCP connection. The client program generally uses the send function to send the request to the server, while the server usually uses the send function to send the reply to the client program.

The first argument to this function specifies the sending end socket descriptor (socket to whom to write who)

The second parameter indicates a buffer that holds data to be sent by the application

The third parameter indicates a buffer that holds data to be sent by the application

1 send first compares the length of the data to be sent len and the length of the send buffer of the socket S. if len is greater than the length of the send buffer of s, this function returns SOCKET_ERROR.

2, if len is less than or equal to the length of the send buffer of s. Then send first checks whether the protocol is sending the data in the send buffer of s.

Thank you for your reading, the above is the content of "linux TCP-related knowledge points". After the study of this article, I believe you have a deeper understanding of what linux TCP-related knowledge points have, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report