Socket
Socket
Sign inDemoInstall

asyncudp

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    asyncudp

Asyncio high level UDP sockets.


Maintainers
1

Readme

Asyncio high level UDP sockets

Asyncio high level UDP sockets.

Project homepage: https://github.com/eerimoq/asyncudp

Documentation: https://asyncudp.readthedocs.org/en/latest

Installation

.. code-block:: python

$ pip install asyncudp

Example client

.. code-block:: python

import asyncio import asyncudp

async def main(): sock = await asyncudp.create_socket(remote_addr=('127.0.0.1', 9999)) sock.sendto(b'Hello!') print(await sock.recvfrom()) sock.close()

asyncio.run(main())

Example server

.. code-block:: python

import asyncio import asyncudp

async def main(): sock = await asyncudp.create_socket(local_addr=('127.0.0.1', 9999))

   while True:
       data, addr = await sock.recvfrom()
       print(data, addr)
       sock.sendto(data, addr)

asyncio.run(main())

Test

.. code-block::

$ python3 -m unittest

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc