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.Connect(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(b'1234')
# 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.3.tar.gz
(7.1 kB
view details)
Built Distribution
File details
Details for the file aioice-0.1.3.tar.gz
.
File metadata
- Download URL: aioice-0.1.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9711b8fe7cd1f8028db3969303f8937a0c7d7f582a067ca968d0927a8e8d795a |
|
MD5 | 050fe5c741f87ee2ee7af6f499c9fac5 |
|
BLAKE2b-256 | 352c12a4b5229e8b45cf881044ce2961ca4e9d9c181a303130f71e99208b969a |
File details
Details for the file aioice-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: aioice-0.1.3-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd5525e5662832c040e70b482d21598e35fe66f43d2815da3a956b67b7f6d9c |
|
MD5 | c630e0b7e63bbed5d57dfca6e987e15c |
|
BLAKE2b-256 | 16334ef71295b3e3381d3d17c0c2bfa12966bb8a42749880afb6055081ba1a5d |