交互式连接建立的实现(rfc 5245)

aioice的Python项目详细描述


rtdpypi-vpypi-pyversionspypi-lpypi-wheeltraviscodecov

什么是aioice

aioice是用于建立交互连接的库(rfc 5245) 在Python中。它构建在python的标准异步asyncio之上 I/O框架。

交互式连接建立(ICE)对于 建立点对点udp数据流,因为它有助于nat的遍历。 典型的用例包括sip和webrtc。

要了解有关aioice的更多信息,请read the documentation

示例

#!/usr/bin/env pythonimportasyncioimportaioiceasyncdefconnect_using_ice():connection=aioice.Connection(ice_controlling=True)# gather local candidatesawaitconnection.gather_candidates()# send your information to the remote party using your signaling methodsend_local_info(connection.local_candidates,connection.local_username,connection.local_password)# receive remote information using your signaling methodremote_candidates,remote_username,remote_password=get_remote_info()# perform ICE handshakeconnection.remote_candidates=remote_candidatesconnection.remote_username=remote_usernameconnection.remote_password=remote_passwordawaitconnection.connect()# send and receive dataawaitconnection.sendto(b'1234',1)data,component=awaitconnection.recvfrom()# close connectionawaitconnection.close()asyncio.get_event_loop().run_until_complete(connect_using_ice())

许可证

aioiceBSD license下释放。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java OpenJDK11:安全提供程序设置   java在JZY3D绘图中强制执行轴限制   javacom。mysql。jdbc。例外情况。jdbc4。MySQLSyntaxErrorException:拒绝用户访问   java使用不同扩展名的文件中的字符串重命名文件   java Hibernate环境获取已更改的字段   java Facebook登录用户访问令牌在开发服务器中工作,但在生产环境中不使用restfb   java如何确保使用BufferedWriter将提示输出到文件?   java为什么不是呢。getFile()正在加载图像   java Spring安全分层角色不工作   SimpleBeanPropertyFilter的任何替代方案都不需要在java的bean级别使用@jsonfilter   JavaGoogleStaticMapsAPI创建具有1000个点的图像   java接收JSON参数包含${}导致Spring启动中出现错误   java Selenium不更新动态选择   java发出包含列表的POST请求   使用JProgressBar运行JFrame的java   java就是ImageIO。读取(文件)易受攻击?   java排序枚举值   Javasocket端口转发   带有构造函数注入的组件的java测试问题   Spring引导生成的java War文件未部署到Weblogic 12c