唐山网站定制,做最好的网站新新,网站建设方案备案,wordpress 屏蔽谷歌字体1. YangIpc.c/yang_create_ipc 需要设置stun服务器的ip地址和端口号 设置iceCandidateType为2#xff0c;表示走stun#xff0c;即向stun服务器发起请求获取本机的公网ip地址。
//设置iceServerIP和端口号#xff0c;设置iceCandidate类型。
strcpy(session-avinfo.rtc…1. YangIpc.c/yang_create_ipc 需要设置stun服务器的ip地址和端口号 设置iceCandidateType为2表示走stun即向stun服务器发起请求获取本机的公网ip地址。
//设置iceServerIP和端口号设置iceCandidate类型。
strcpy(session-avinfo.rtc.iceServerIP,182.92.163.143);
session-avinfo.rtc.iceServerPort3478;//ice候选者类型0为host1为stun2为turn
session-avinfo.rtc.iceCandidateType0;
2. yang_config.ini 需要设置iceUserName和icePassword 设置iceUsingLocalIp为0
//ice使用本地ip地址当此值设置为1时表示不使用stun和turn使用host
iceUsingLocalIp0//ice的userName和password,用于连接stun和turn服务器使用。
iceUserNamemetartc
icePasswordmetartc
如果仅仅是想通过p2p连接经过以上设置应该已经可以用了。