Y
yangmingnian
Unregistered / Unconfirmed
GUEST, unregistred user!
delphi7中自带了组播控件IdIPMCastServer和IdIPMCastClient,可是试来试去发现总是无法触发IdIPMCastClient相关的read事件,不知道有没有人用过这个控件,代码基本上是这样的
client端:
var
idsh: TIdSocketHandle;
begin
idsh:=IdIPMCastClient1.Bindings.Add;
idsh.IP:='192.168.0.243';
idsh.Port:=5000;
IdIPMCastClient1.MulticastGroup:='224.0.0.1';
IdIPMCastClient1.Active:=true;
end;
server端:
IdIPMCastServer1.MulticastGroup:='224.0.0.1';
IdIPMCastServer1.Port:=5000;
IdIPMCastServer1.Active:=true;
IdIPMCastServer1.Send('hello');
以上代码始终无法触发IdIPMCastClient1的OnIPMCastRead事件,到底问题在哪儿?
client端:
var
idsh: TIdSocketHandle;
begin
idsh:=IdIPMCastClient1.Bindings.Add;
idsh.IP:='192.168.0.243';
idsh.Port:=5000;
IdIPMCastClient1.MulticastGroup:='224.0.0.1';
IdIPMCastClient1.Active:=true;
end;
server端:
IdIPMCastServer1.MulticastGroup:='224.0.0.1';
IdIPMCastServer1.Port:=5000;
IdIPMCastServer1.Active:=true;
IdIPMCastServer1.Send('hello');
以上代码始终无法触发IdIPMCastClient1的OnIPMCastRead事件,到底问题在哪儿?