UDP between apps?

The data available event of UDPSocket1 should show the port upon which the data was received.

[code]Sub DataAvailable()
dim d as Datagram
dim msg as string

d = me.Read
msg = "data received from " + d.Address + " on port " + str(d.Port) + “the messsage :” + d.Data + “:”
ReceivedTextArea.Text = ReceivedTextArea.Text + msg

End Sub[/code]

As you are bound to receive on port 8081. I would think that that is what the message displayed should say.

It says 8080 and it WILL NOT work if the master d.Port = 8080. It only works with the combination thatI showed, above, and d.Port in the slave says that it was received on 8080.

The master is at:
https://www.dropbox.com/s/go5umvs9zoxv9a5/eKoServer.xojo_binary_project
The slave is at
https://www.dropbox.com/s/1d98hbzpoyyjxkw/eKoServerServer.xojo_binary_project

To run the master, click “Create New Network”, the click the “Test” button. Some of the code comments are screwy around UDPSocket settings because they have been changed so many times.

Be aware that the master creates a data base & logfile in ApplicationData then eKoServer…

Thanks
Jim

I’m having troubles running your app on my mac.
I’m getting the error message:
Error reading OS Network getinfo - 4;
have to shut down!

I suspect you are trying to enumerate the network devices for the pull down using OS commands and my os isn’t responding they way yours does.

in the mean time consider this diagram because i’m not sure you’re understanding something… (maybe)

Is this helpful?

[code]Dim count As Integer
count = System.NetworkInterfaceCount

For i As Integer = 0 To count-1
Listbox1.AddRow(System.GetNetworkInterface(i).IPAddress)
Next[/code]

Yes, I am trying to enumerate network devices.

As I recall, System.GetNetworkInterface() does not identify the user-recognizable network name (ie, ethernet, AIrport, WiFi, and such). Instead, it uses system names such as en1.

I can remove that. It is provisional, anyway, and does not include Windows or Linux.

OK, I was assuming that “connect” enabled an output (write) stream. I’ll see if I can make sense of it in light of your diagram.

Thanks

Jim

My pleasure Jim.

Is it just me or does anybody else think that connect is a bad method name for a UDP Socket?

Given what it seems to do, I also think it is a poor name choice.

Jim