An implementation of Interactive Connectivity Establishment (RFC 5245)
Project description
What is aioice?
aioice is a library for Interactive Connectivity Establishment (RFC 5245) in Python. It is built on top of `asyncio`, Python’s standard asynchronous I/O framework.
#!/usr/bin/env python
import asyncio
import aioice
async def connect_using_ice(uri):
connection = aioice.Connection(ice_controlling=True)
# gather local candidates
local_candidates = await connection.get_local_candidates()
# send your information to the remote party using your signaling method
send_local_info(
local_candidates,
connection.local_username,
connection.local_password)
# receive remote information using your signaling method
remote_candidates, remote_username, remote_password = get_remote_info()
# perform ICE handshake
connection.remote_username = remote_username
connection.remote_password = remote_password
connection.set_remote_candidates(remote_candidates)
await connection.connect()
# send and receive data
await connection.send(b'1234')
data = await connection.recv()
# close connection
await connection.close()
asyncio.get_event_loop().run_until_complete(connect_using_ice())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioice-0.1.6.tar.gz
(8.7 kB
view details)
Built Distribution
aioice-0.1.6-py3-none-any.whl
(11.3 kB
view details)
File details
Details for the file aioice-0.1.6.tar.gz
.
File metadata
- Download URL: aioice-0.1.6.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22bf25bde56efc3f917fe303d7707ad58bc8cba9e0c3ba8aa65e34f07de7013c |
|
MD5 | e0ced9ce6634a4a486eec5bfa21a4bc1 |
|
BLAKE2b-256 | 3e6432d92f85ef1f10bb3edbd880545158ca330030d8c3bd0512a4905fa6f730 |
File details
Details for the file aioice-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: aioice-0.1.6-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aaeb882e418e1928906795462193ae8429659c6cfe033fb0cae5973ec1b54973 |
|
MD5 | 6521e6b6d1e60aceb2edbff154ca18c2 |
|
BLAKE2b-256 | 1cffe58e81258a4f8905e5a6c93f34aaadb90bdd3c67d8198123b081f6d7d665 |