交互式连接建立的实现(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如何在Android Wifi中筛选相同的SSID?   Java中重写接口中异常处理的泛型   java“无效转义序列(有效的是\b\t\n\f\r\”\“\”\)”语法错误   使用JNDI的java NameReadyBoundException   java如何在这个程序上执行算法   java为什么我的应用程序在调试时崩溃而应用程序停止?   Java:while循环未检测到中断条件,但如果块检测到   java如何快速使用jfreechart创建的折线图   java将输入放入JSTL会话变量,以便稍后在屏幕上显示   java在spring boot中加载外部JAR   java Apache NiFi无法使用ojdbc6连接到Oracle 12c。jar或ojdbc8。罐子   java解释StringToWordVector()Weka的输出   java charAt()找不到符号   使用mpjexpress的java阅读控制台输入