aioice

pypi-v pypi-pyversions pypi-l pypi-wheel tests codecov

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.

Interactive Connectivity Establishment (ICE) is useful for applications that establish peer-to-peer UDP data streams, as it facilitates NAT traversal. Typical usecases include SIP and WebRTC.

API Reference

Changelog

0.7.7

  • Close underlying transport when a TURN allocation is deleted.

  • Shutdown mDNS stack when it is no longer referenced.

  • Rewrite asynchronous tests as coroutines.

0.7.6

  • Ensure dnspython version is at least 2.0.0.

  • Avoid 400 error when using TURN with concurrent sends.

  • Avoid error if a connection is lost before the local candidate is set.

0.7.5

  • Emit an event when the ICE connection is closed.

0.7.4

  • Perform mDNS resolution using an A query, as Firefox does not respond to ANY queries.

  • Use full module name to name loggers.

0.7.3

  • Defer mDNS lock initialisation to avoid mismatched event-loops, fixes errors seen with uvloop.

  • Correctly gather STUN candidates when there are multiple components.

0.7.2

  • Add support for resolving mDNS candidates.

0.7.1

TURN

  • Use the LIFETIME attribute returned by the server to determine the time-to-expiry for the allocation.

  • Raise stun.TransactionFailed if TURN allocation request is rejected with an error.

  • Handle 438 (Stale Nonce) error responses.

  • Ignore STUN transaction errors when deleting TURN allocation.

  • Periodically refresh channel bindings.

0.7.0

Breaking

  • Make Connection.add_remote_candidate() a coroutine.

  • Remove the Connection.remote_candidates setter.

License

Copyright (c) 2018-2019 Jeremy Lainé.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of aioice nor the names of its contributors may
      be used to endorse or promote products derived from this software without
      specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.