iOS Question Geting Default Gateway

There is no API for that. You can however find the UDP broadcast address with UDPSocket.GetBroadcastAddress and then send a message to all other devices in the network.
I don't see GetBroadcastAddress in UDPSocket method
 
Upvote 0
Dear Erel, I use this to send file to another device.
But I want to send file to all devices are opened the application

What is your idea? How can I do this?
 
Upvote 0
I can't worked with MQTT , because we don't have any MQTT broker in b4i , and I want to send a file in connected devices.
If I want to send file to one device , How can I do ?

I am using this code for find ip range :
Code: Copy
ip = server.GetMyWifiIp

Dim m As Matcher = Regex.Matcher2("\.[^.]*$", 0, ip)
Do While m.Find
current = m.Match.Replace(".","")
range = ip.Replace(m.Match,".")
Loop

and with this code I connect to about 130 ip

Code: Copy
Sub connect
     For i=0 To 130
        
     If i <> current And i <> 1 And i <> 0 Then
ip = range&i
ip = ip.Trim
client.Connect(ip,port, 30000)
End If


Next
End Sub

But this don't work !
I see newConnection in my log after that I see astream_Terminated

why this happend ?

what is best way to connect to other device , I dont know other device or devices ip and want to connect automatically.

Thanks.
 
Upvote 0
Back
Top