How to broadcast socket
Chris Gonnerman
chris.gonnerman at usa.net
Sun Mar 4 09:46:51 EST 2001
So, *exactly* what *does* it do? Throw an exception? Appear to work but
not send a packet? How do you know if it sent or not (i.e. are you testing
with
another application or did you actually use a packet sniffer?)
If you are testing with an application and the application shows no sign of
receiving the packet, get a packet sniffer and see if anything is actually
being sent. I use Ethereal (don't remember the URL but look on
freshmeat.net)
but I believe there are many others.
----- Original Message -----
From: "Jörgen Tapani" <jota at telia.com>
Subject: How to broadcast socket
> I'm new to Python, and I have achived this
> def test():
> s = socket(AF_INET, SOCK_DGRAM)
> s.setsockopt(SOL_SOCKET,SO_BROADCAST,1)
> s.sendto('Broadcast test',INADDR_BROADCAST)
> s.close()
>
> And it do not run!
> Help!
> Jorgen Tapani
More information about the Python-list
mailing list