自学RTC——DualServer
从其它平台迁移而来 在窗体上放4个TRtcHttpServer,依次设置ServerPort为:80、443、8080和8090,并分别命名为HS80、HS443、HS8080和HS8090 再放3个TRtcDualDataServerLink到窗体上,分别命名为DL80and443、DL8080and8090和DLall 设置DL80and443的Server属性为HS80,Server2属性为HS443;设置DL8080and8090的Server属性为HS8080,Server2属性为HS8090 设置DLall的Link属性为DL80and443,Link2属性为DL8080and8090 再放1个TRtcDataProvider到窗体上,设置Link属性为DLall,并在OnCheckRequest事件里写上代码: 1 2 3 4 5 with TRtcDataServer(Sender) do begin Accept; Write('you are on Server ' + ServerPort); end; 在窗口OnShow事件里启动所有TRtcHttpServer,在OnClose事件里停止所有TRtcHttpServer 编译运行 在浏览器里分别访问http://localhost:80、http://localhost:443、http://localhost:8080、http://localhost:8090 注意:TRtcDualDataServerLink只能选择设置Server*或Link*!