Skip to main content

An implementation of Interactive Connectivity Establishment (RFC 5245)

Project description

pypi-v pypi-pyversions pypi-l pypi-wheel travis coveralls

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():
    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


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.2.0.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

aioice-0.2.0-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page