Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sockets Receive Buffer Queue  (Read 2542 times)

0 Members and 1 Guest are viewing this topic.

Gregory

  • Newbie
  • *
  • Posts: 41
    • View Profile
Sockets Receive Buffer Queue
« on: September 10, 2013, 01:54:00 am »
Hello guys. I'm studdyng to make a netowkr based game that will use UDP sockets. The server will be authoritative and will handle all the physics.

I'm planning the server to broadcast at 10hz, the physics will run in constant time-step of something like ~33ms or so (3 physics step for each broadcast step) this will run on a single thread.

To receive the clients information I was thinking to have all the sockets at NOblokingMode and when some socket has some information it puts the information on a queue that will be used at the nest physics simulation. This appear to be a good aproach? (I know about the UDP and the security layer I will need to implement above it).

My main question is: what is the size of the kernels internal socket queue? It is enought to store some data that can come in between each socket polling?

Thanks.
Gregory.



 


zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Sockets Receive Buffer Queue
« Reply #1 on: September 12, 2013, 01:53:31 pm »
My main question is: what is the size of the kernels internal socket queue? It is enought to store some data that can come in between each socket polling?

There is no way to answer what the size of the kernel's socket queue is because it most likely varies across kernels. In the end, unless you run into problems you should focus on making your game and not worry about the depths of how kernels implement things.  ;)
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor