Wednesday 21 August 2013

Socket I/O processing (high-traffic)

Socket I/O processing (high-traffic)

I'm working on a high-traffic network program that using Tcp sockets. I
think I need 3 threads for this system.
Tcp main listening: select() based I/O handling
In data processing class: handling packets, selecting sockets for sending
output data (for game/char systems etc.)
Out data processing class: I'll send data with send() method that is
blocking method, so I need to implement a loop (while/for) and this loop
will take a while to process and I wont slow down in data processing, I'll
implement this data processing class for socket send loop.
Now I'm going to implement a network hierarchy like this but I'm note sure
to create a out data processing class. Do I need this for improve network
performance? Otherwise, any other suggession for improving network
performance? (maybe I can't see something)
PLUS: I'm packing incoming Tcp packets for handling a complete packet from
client which is a special packet like game RPC positioning, custom request
etc.

No comments:

Post a Comment