[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] SOC Proposal: Networking for Pygame




On May 7, 2006, at 8:47 PM, Peter Shinners wrote:

On Sun, 2006-05-07 at 20:27 -0700, Brian Fisher wrote:
Also, having to integrate the packet handling into your main loop
wouldn't necessarily help you have good design - for some network
models, it makes a lot more sense to encapsulate the communication

I'd lean towards this design as well. Just make the "pump" style function also return all the updates since the previous call.

If the API is going to be threaded then using the Pygame/SDL event queue
makes a bit more sense. Make each connection take an event id number to
use. This is still easy enough to use, but avoids id collisions.

I don't think having a connection per SDL event ID would work. There's not all that many of them to go around is there?


You only really need one event id for networking...

-bob