iOS Question Array of sockets?

techknight

Well-Known Member
Licensed User
Longtime User
Can we create an array of sockets?

Basically I want to have multiple simultanious connections to different IP addys. (say max of 5, all internal IPs) at any point, and want them all to go through the same ONE asyncstreams handlers and events, with the same ONE socket successful event. not 5 individual events.

any ideas? Thanks.

Basically to connect to my embedded devices.
 

techknight

Well-Known Member
Licensed User
Longtime User
I took a look at it, but I am not really following it? That B4J app is acting as a server.

I am doing the opposite. I am connecting to multiple server/service IP addresses.

Basically, I want my tablet to connect to a sensor net. There are maybe 4 or 5 sensors at different internal IP addresses, all the same port. I am Sending/receiving serial data to each one simultaneously.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Well, with android I always did Socket1 as socket. Then it raises Socket1_Connected, which its at this point where I need to open the astreams handler. But for multiple IPs, i would need to declare Socket2, Socket3, etc... No? that means i would need an event handler for each and every socket?

I was hoping there was something like Dim Sockets() as Socket and it would raise say a Sockets_Connected(index as integer). That would be nice.

like I said there are some things I just dont quite understand.
 
Upvote 0
Top