[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Networking?
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Networking?
- From: David <dvkeeney@xxxxxxxxx>
- Date: Wed, 21 Nov 2007 10:09:53 -0500
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Wed, 21 Nov 2007 10:10:02 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=565ZjfR5zOq2773q49pSPtXrCnjzgOTuClmzZLNV/Ys=; b=CHGYPUCLdyHFm0KfXVz8Er0+N2vBCrzblr76/viVXoRnG0UpQk7MdfkLVRde86byGTDYpgraQKCgfqNUlECzPXb8HC955WHa7zNiKXOoqtSGkM7QrKvm0hkiEEy1Yj2f5oNHHWfIO73WEOlTYKUAQXvtS2RJLO/6DKUY6EVX28E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KiIDBnhXqlCRACj2RncY7uiK42MStHE1FwYKlhY+OOwAdvBrrCds90aC9Xe0delYN4VHfPDJabv6ON3r7EgXtkgZhIPT52qx8LPAGbaDl50CuwKtocGSEOyowD2GTnl0qf3MChUYd/DwX1q72NHYN++ToVRXOQw1irdZ4D/PYRs=
- In-reply-to: <5A7F36775DDD854CB1873E5F790C4D3701E0CC69@xxxxxxxxxxxxxxxxx>
- References: <5A7F36775DDD854CB1873E5F790C4D3701E0CC69@xxxxxxxxxxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On 11/21/07, Chris Ashurst <CAshurst@xxxxxxxx> wrote:
> I hope you mean that the sockets library is not the place to start, simply
> because it's not immediately easy (unlike Twisted) to get right into? I
> believe every programmer who wants to use a higher-level library should at
> least have a stab at the low-level stuff, just to give a better idea of
> what's going on behind the automagical scenese of things like Twisted
What I meant is that to accomplish something usefull using the sockets
library, you have to build higher level systems, and you end up
reinventing asyncore or Twisted. Reinventing sucks.
> Rather than haul in Twisted, a little research on the Python select module
> could be the very thing people are looking for - all without having any
> extra dependencies/includes other than the core Python library and Pygame.
To each their own, but I consider additional pure-python dependencies
to be a non-issue. If including an extra 100K of library code saves
me a couple hours of work, I am all for it. Non-pure-python
dependencies are an issue, because they may not build on the users
machine.
> http://www.amk.ca/python/howto/sockets/
> <http://www.amk.ca/python/howto/sockets/ - > - the Non-blocking Sockets
> section is particularly enlightening
This is actually the document I would refer people to, to scare them
away from socket programming. ;)
Quotes:
# This is a 10,000 foot overview of sockets. It's not really a
tutorial - you'll still have
# work to do in getting things operational. It doesn't cover the fine
points (and there
# are a lot of them), but I hope ...
# There's no question that the fastest sockets code uses non-blocking sockets
# and select to multiplex them. ... The trouble is that an app
written this way
# can't do much of anything else - it needs to be ready to shuffle
bytes around at
# all times.
That document was written in the mid 1990's, and the state of
networking in Python has advanced since then.
As a matter of context, this is a Pygame mailing list, and presumably
list-members are interested in getting their game complete and robust.
A networking library is just a tool to getting the cool game-state
from this server to that client (and client events back to the
server), not a contributer to game-state coolness. No disrespect to
socket-twiddlers, and I get the impression the original poster may be
one himself, but many on the list are interested in easy toolkits to
just "get 'er done".
David
--
dkeeney@xxxxxxxxxxxxxxxx
Pitcher's Duel -> pitchersduel.python-hosting.com