git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2463 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2006-10-26 22:17:03 +00:00
parent ea1657a589
commit 620c00c52c
117 changed files with 12189 additions and 425 deletions
+21
View File
@@ -0,0 +1,21 @@
As the game currently unfortunately works with polling, this is how
to integrate network handling with the game.
In the function called periodically by DoInput(), there should be a call
to netInput() somewhere at the beginning, and a call to flushPacketQueues()
somewhere at the end.
netInput() checks all connections for incoming packets, and calls
the appropriate packet handlers.
flushPacketQueues() sends all pending packets on their way, for all
connections.
In between, you can call functions that enqueue packets.
You would also check the network state here to determine whether you need to
act on some packet that has been delivered to the local party.