Hi. I have wrote a background program for Linux for discovering machines in a
network using udp. The program is necessary because the machines can have an
address in a unknown network and I must find them.
This is the server side program:
TBSUdpSocket.bind('255.255.255.255', '65534');
if TBSUdpSocket.LastError<> 0 then WriteLn(TBSUdpSocket.LastErrorDesc)
else begin
while not Terminated do begin
StringIn:= TBSUdpSocket.RecvPacket(1000);
And this is the client side:
TBSUdpSocket.CreateSocket;
TBSUdpSocket.EnableBroadcast(true);
TBSUdpSocket.Connect('255.255.255.255', '65534');
TBSUdpSocket.SendString('_?'+ #10);
TBSUdpSocket.Connect('255.255.255.255', '65534');
The program can discover machines only if the machines are in the same network
of the client.
How can I find machines in a different network (multicast)?
I have already tried
EnableBroadcast(true);
MulticastTTL:= 10;
AddMulticast('234.5.6.7');
--
Denis Gottardello
Sintesi S.r.l.
+39.049.9301135
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public