VoIP聊天不会与UDP连接 [英] VoIP chat wont connect with UDP
本文介绍了VoIP聊天不会与UDP连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。
我已经在VoIP应用程序和服务器上工作了一段时间。
I've been working on a VoIP application and server for a while.
起初,我用过TCP协议,但由于开销我想改为UDP以消除声音环回。
At first, i used TCP protocol, but due to the overhead i wanted to change to UDP to eliminate the sound loopback.
但当我启动服务器配置为UDP而不是TCP时,我得到错误说:" ;
请求的协议具有尚未针对系统进行配置或没有为其实施"
But when i fire up server configured to UDP instead of TCP, i get error saying: "The requested protocol has not been configured for the system or there is no implementation for it"
< span title ="Detbegärdaprotokollethar intekonfigureratsföreloymetelleråfinnsdet ingen implementationförsde"style ="background-color:#ebeff9">这是我改变的代码,用于转发; n TCP到UDP;
Listener_Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.TCP);
推荐答案
TCP / IP是数据的'流',UDP只是个别数据包,即数据报,所以你需要使用
SocketType.Datagram 。
TCP/IP is a 'stream' of data, UDP is just individual packets, i.e. Datagrams, so you need to use SocketType.Datagram.
这篇关于VoIP聊天不会与UDP连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文