I'm really struggling to get this working. I have two issues. 

1. broadcast messages don't arrive.
2. recv() hangs until there is some data available because I can't see how 
to apply a timeout.

I decided to just try to talk to myself as a first step. Could someone else 
try this please and tell me if I'm doing something wrong or if broadcast is 
broken.
Sender side:
*This works*
#addr = IPv4(255,255,255,255) 

addr = IPv4(127,0,0,1)

s = UdpSocket()

#ccall(:uv_udp_set_broadcast,Cint,(Ptr{Void},Cint), s, 1)

msg = zeros(Uint8, 63)

msg[1] = 0xef

msg[2] = 0xfe

msg[3] = 0x02

send(s, addr, 1024, msg)


*This fails (nothing received)*
addr = IPv4(255,255,255,255) 

#addr = IPv4(127,0,0,1)

s = UdpSocket()

ccall(:uv_udp_set_broadcast,Cint,(Ptr{Void},Cint), s, 1)

msg = zeros(Uint8, 63)

msg[1] = 0xef

msg[2] = 0xfe

msg[3] = 0x02

send(s, addr, 1024, msg)


Receiver side:
addr = IPv4(127,0,0,1) 

s = UdpSocket()

bind(s, addr, 1024)

println(recv(s))




On Wednesday, February 5, 2014 7:57:34 PM UTC, Bob Cowdery wrote:
>
> Does the network i/o package support UDP as it only seems to have TCP 
> functions.
>
> Thanks
> Bob
>

Reply via email to