从其它平台迁移而来


  1. 在窗体上放4TRtcHttpServer,依次设置ServerPort为:8044380808090,并分别命名为HS80HS443HS8080HS8090

  2. 再放3TRtcDualDataServerLink到窗体上,分别命名为DL80and443DL8080and8090DLall

  3. 设置DL80and443Server属性为HS80Server2属性为HS443;设置DL8080and8090Server属性为HS8080Server2属性为HS8090

  4. 设置DLallLink属性为DL80and443Link2属性为DL8080and8090

  5. 再放1TRtcDataProvider到窗体上,设置Link属性为DLall,并在OnCheckRequest事件里写上代码:

1
2
3
4
5
with TRtcDataServer(Sender) do
begin
  Accept;
  Write('you are on Server ' + ServerPort);
end;
  1. 在窗口OnShow事件里启动所有TRtcHttpServer,在OnClose事件里停止所有TRtcHttpServer

  2. 编译运行

  3. 在浏览器里分别访问http://localhost:80http://localhost:443http://localhost:8080http://localhost:8090

注意:TRtcDualDataServerLink只能选择设置Server*Link*