Original Post
Hello guys
This the approximate model of my server. It uses reliable UDP and the game style is click-based [e.g. clicked-here-done-this, clicked-there-went-there]. I would like to know if the overall design is bad and how many online users approximately can I have on a HT P4 server.
main()
{
Server.Init()
Network.Init()
CreateIncomingThread()
CreateOutgoingThread()
while(true)
{
ProcessQueue()
PushResultIntoOutgoingQueue()
}
}
IncomingThread()
{
if (PollForPackets())
{
SendBackACKPacket();
PushRequestIntoProcessingQueue()
}
}
OutgoingThread()
{
SendOutgoingQueue()
}
Many people told me that polling is always BAD. What''s the better alternative for this model?
Thanks very much.