<commit_before>Data channel file transfer
==========================

This example illustrates sending a file over a data channel using an
RTCPeerConnection and a "copy and paste" signaling channel to exchange SDP.

First install the required packages:

.. code-block:: console

    $ pip install aiortc uvloop

To run the example, you will need instances of the `filexfer` example:

- The first takes on the role of the offerer. It generates an offer which you
  must copy-and-paste to the answerer.

.. code-block:: console

   $ python cli.py send somefile.pdf

- The second takes on the role of the answerer. When given an offer, it will
  generate an answer which you must copy-and-paste to the offerer.

.. code-block:: console

   $ python cli.py receive received.pdf
<commit_msg>[examples] fix typos in datachannel-filexfer README.rst<commit_after>Data channel file transfer
==========================

This example illustrates sending a file over a data channel using an
RTCPeerConnection and a "copy and paste" signaling channel to exchange SDP.

First install the required packages:

.. code-block:: console

    $ pip install aiortc uvloop

To run the example, you will need instances of the `filexfer` example:

- The first takes on the role of the offerer. It generates an offer which you
  must copy-and-paste to the answerer.

.. code-block:: console

   $ python filexfer.py send somefile.pdf

- The second takes on the role of the answerer. When given an offer, it will
  generate an answer which you must copy-and-paste to the offerer.

.. code-block:: console

   $ python filexfer.py receive received.pdf

{'fraction_non_alphanumeric': 0.08856088560885608, 'fraction_numerical': 0.0, 'mean_word_length': 3.8136094674556213, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5988095', 'n_tokens_mistral': 458, 'n_tokens_neox': 440, 'n_words': 219}