Re: socket send help

2009-01-07 Thread Bryan Olson
Gabriel Genellina wrote: James Mills escribió: Bryan Olson wrote: I thought a firewall would block an attempt to bind to any routeable address, but not to localhost. So using INADDR_ANY would be rejected. No. My understanding is that firewalls block network traffic, not system calls. This

Re: socket send help

2009-01-06 Thread Gabriel Genellina
En Mon, 05 Jan 2009 22:59:46 -0200, James Mills escribió: On Tue, Jan 6, 2009 at 10:49 AM, Bryan Olson wrote: I thought a firewall would block an attempt to bind to any routeable address, but not to localhost. So using INADDR_ANY would be rejected. No. My understanding is that firewalls b

Re: socket send help

2009-01-05 Thread James Mills
On Wed, Dec 24, 2008 at 3:59 PM, greyw...@gmail.com wrote: (snip) > If I run testserver.py via the cmd prompt in Windows XP and then the > testclient.py program, I get the following error: > > Traceback (most recent call last): > File "C:\Python30\testclient.py", line 12, in >s.send('Hello

Re: socket send help

2009-01-05 Thread James Mills
On Tue, Jan 6, 2009 at 10:49 AM, Bryan Olson wrote: >> I thought a firewall would block an attempt to bind to any routeable >> address, but not to localhost. So using INADDR_ANY would be rejected. No. > My understanding is that firewalls block network traffic, not system calls. This is correct.

Re: socket send help

2009-01-05 Thread Bryan Olson
Gabriel Genellina wrote: Bryan Olson escribió: Gabriel Genellina wrote: greyw...@gmail.com escribió: [...] A simple server: from socket import * myHost = '' Try with myHost = '127.0.0.1' instead - a firewall might be blocking your server. Just a nit: I'd say the reason to use '127.0.0.1

Re: socket send help

2009-01-05 Thread Gabriel Genellina
En Sat, 03 Jan 2009 21:44:34 -0200, Bryan Olson escribió: Gabriel Genellina wrote: greyw...@gmail.com escribió: [...] A simple server: from socket import * myHost = '' Try with myHost = '127.0.0.1' instead - a firewall might be blocking your server. Just a nit: I'd say the reason to

Re: socket send help

2009-01-03 Thread Bryan Olson
Gabriel Genellina wrote: greyw...@gmail.com escribió: [...] A simple server: from socket import * myHost = '' Try with myHost = '127.0.0.1' instead - a firewall might be blocking your server. Just a nit: I'd say the reason to use '127.0.0.1' instead of the empty string is that a firewall

Re: socket send help

2008-12-25 Thread Chris Rebert
On Thu, Dec 25, 2008 at 10:08 PM, greyw...@gmail.com wrote: > Hi again, > > I've done some more playing around with socket and socketserver and > have discovered I can send strings or lists with socket.send() by > converting to bytes. But lists with strings in them or dicts can't be > converted b

Re: socket send help

2008-12-25 Thread greyw...@gmail.com
Hi again, I've done some more playing around with socket and socketserver and have discovered I can send strings or lists with socket.send() by converting to bytes. But lists with strings in them or dicts can't be converted by bytes(). How can I send those? One idea I initially tried was to set

Re: socket send help

2008-12-24 Thread greyw...@gmail.com
Chris & Gabriel, Thank you so much. My simple example now works. It was very frustrating that even the simple example didn't work, so your help is most appreciated. b'hello world' was the key. As for the error, I do still get it with 3.0 final so I'll go ahead and report it. John. On Dec 24,

Re: socket send help

2008-12-23 Thread Gabriel Genellina
En Wed, 24 Dec 2008 03:59:42 -0200, greyw...@gmail.com escribió: New guy here. I'm trying to figure out sockets in order to one day do a multiplayer game. Here's my problem: even the simplest examples don't work on my computer: A simple server: from socket import * myHost = '' Try with

Re: socket send help

2008-12-23 Thread Chris Rebert
On Tue, Dec 23, 2008 at 9:59 PM, greyw...@gmail.com wrote: > Hi everyone, > > New guy here. I'm trying to figure out sockets in order to one day do > a multiplayer game. Here's my problem: even the simplest examples > don't work on my computer: > > A simple server: > > from socket import * > my

socket send help

2008-12-23 Thread greyw...@gmail.com
Hi everyone, New guy here. I'm trying to figure out sockets in order to one day do a multiplayer game. Here's my problem: even the simplest examples don't work on my computer: A simple server: from socket import * myHost = '' myPort = 21500 s = socket(AF_INET, SOCK_STREAM)# create a TCP