Just for info for those who later may need such a functionality.
I tried the UDP method, opening an UDP socket in waiting read mode and
flushing an UDP message on the broadcast address. All the nodes in the
network receive the message correctly and then they now who is the emettor
(the ip is in the message) and can connect in tcp mode.
That's all.
Frederic MAILLET a ecrit :
> Well, I thought at this solution, trying to connect to all ip adress in
> the subnet, but this is quite a hard way to solve the problem.
> I'm really new to network programming, but found some informations on
> internet. Tell me if this solution is realistic:
> using the UDP fp, is it possible to open a UDP socket in read mode on
> each program, waiting for a simple m
essage, and then the main supervisor
> send an UDP message on the broadcast address containing just its own IP
> address. Would the differents programs on the subnet get the message in
> this case ? If yes, then they will know the address they should connect
> to the supervisor in TCP mode, that's right?
>
> Thanks Chris for your help,
> --
> Fred.
>
> Chris Matthews a ecrit :
>
> > Broacast messages are messages that a server can send out to all
> > connected clients, they can't be used from clients or to check for
> > servers. The only way to check for servers on the network with CVI
> > functions is to try and connect to them with ConnectToTCPServer. You
> > will get a timeout error if the server is not there.
> >
> > Best Regards,
> >
> > Chris Matthews
--
F. Maillet - Sodatec Toulouse
Responsable Qualite Projets