error with examples (UDP broadcast)

D

Damir Hakimov

Hi All!

I'm writing a small programm which must send and service UDP broadcast
packets.
As start of it I looked at
/usr/share/doc/python2.4/Examples/Demo/sockets/broadcast.py

damir@debian-IBM:/usr/share/doc/python2.4/examples/Demo/sockets$
python2.4 broadcast.py
Traceback (most recent call last):
File "broadcast.py", line 14, in ?
s.sendto(data, ('<broadcast>', MYPORT))
socket.error: (101, 'Network is unreachable')
damir@debian-IBM:/usr/share/doc/python2.4/examples/Demo/sockets$

If I replace '<broadcast>' to '192.168.10.255' (this is my network's
broadcast addres) it's working fine.
Were is the truble?

Damir.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top