UDPSocket problems with MacOsX

S

sebastian wiswedel

hello,
i´ve got a problem with UDPSocket under MacOsX 10.2
the following code is not working:

server = UDPSocket.open()
server.bind(nil, $portUDP)

$portUDP is f.e. 12345.
it not even gives me an ErrorMessage.
the "client" code:
sock = UDPSocket.open(Socket::AF_INET)
sock.connect($hostname, $portUDP)
sock.send("connection-based", 0)
is working fine, when starting the "server"-code on a linux machine.

any Ideas or known problems?
cheers,
sebastian
 
S

Scott Thompson

i´ve got a problem with UDPSocket under MacOsX 10.2
the following code is not working:

server = UDPSocket.open()
server.bind(nil, $portUDP)

$portUDP is f.e. 12345.
it not even gives me an ErrorMessage.
the "client" code:
sock = UDPSocket.open(Socket::AF_INET)
sock.connect($hostname, $portUDP)
sock.send("connection-based", 0)
is working fine, when starting the "server"-code on a linux machine.

Does it work better if you use the empty string instead of nil in the
call to bind? I.e.:

server.bind("", $portUDP)

What are you doing after the bind to send UDP information?

Scott
 

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,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top