socket code

G

Guest

Hello,

I'm trying to create a broadcast socket in some portable code (windows XP & mandrake linux). When I run the following lines through idle:

import socket
s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
s.connect( ('<broadcast>', 17100) )

On windows, connect() returns and I have a broadcast socket to which I can write. One LINUX connect() just tells me 'Permission denied'.

Does anybody know why? Any thoughts on how I can get around this? I have to transmitt data to an old system. The system only reads broadcast data on port 17100.

Thanks for the input.

Ron Provost
 
G

Grant Edwards

Hello,

I'm trying to create a broadcast socket in some portable code (windows XP & mandrake linux). When I run the following lines through idle:

import socket
s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
s.connect( ('<broadcast>', 17100) )

On windows, connect() returns and I have a broadcast socket to
which I can write. One LINUX connect() just tells me
'Permission denied'.

Does anybody know why? Any thoughts on how I can get around
this? I have to transmitt data to an old system. The system
only reads broadcast data on port 17100.

Didn't we just answer this question for you two weeks ago?

http://groups-beta.google.com/group..._frm/thread/6447ef29cf613660/dcdc52690aa562e1
 

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

Forum statistics

Threads
474,260
Messages
2,571,308
Members
47,963
Latest member
NancyRyl51

Latest Threads

Top