Socket I / O Handling (High Traffic)

I am working on a high traffic network network that uses Tcp sockets. I think I need 3 threads for this system.

  • Basic Tcp listening: select () based on I / O
  • In the data processing class: packets are processed, choosing sockets for sending output data (for games / char systems, etc.).
  • Data Processing Class:. I will send data with the send () method, which is a lock method, so I need to implement a (while / for) loop, and this loop will take some time, and I will not slow down the data processing, I will implement this data processing class for the socket send loop .

Now I am going to implement such a network hierarchy, but I am sure that I must create a data processing class. Is this necessary to improve network performance? Otherwise, any other suggestion for improving network performance? (maybe I don't see anything)

PLUS: I collect incoming Tcp packets to process the complete packet from the client, which is a special package, such as positioning the RPC in the game, user request, etc.

0
c ++ io networking sockets tcp
source share

No one has answered this question yet.

See similar questions:

7
Handling 7000+ customers? -MultiThreading (TCP, high traffic)

or similar:

23498
Why is processing a sorted array faster than processing an unsorted array?
1975
How do I know which process the port is listening on in Windows?
1518
Image Processing: Enhanced Coca-Cola Can Recognition Algorithm
819
What is the difference between a port and a socket?
102
How does the accept API () function work?
7
Handling 7000+ customers? -MultiThreading (TCP, high traffic)
3
Socket Data Processing - Data Packing (TCP)
2
MMO gaming sockets, security and use
2
TCP packets in Raw socket - Centos 6.6
-one
How to synchronize communication speed between a socket server and a client on Linux

All Articles