Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.22 KB

File metadata and controls

44 lines (31 loc) · 1.22 KB

UTCP Socket Plugin (UDP/TCP)

This plugin adds UDP and TCP communication protocols to UTCP 1.0.

Running Tests

Prerequisites:

  • Python 3.10+
  • pip
  • (Optional) a virtual environment
  1. Install core and the socket plugin in editable mode with dev extras:
pip install -e "./core[dev]"
pip install -e ./plugins/communication_protocols/socket[dev]
  1. Run the socket plugin tests:
python -m pytest plugins/communication_protocols/socket/tests -v
  1. Run a single test or filter by keyword:
# One file
python -m pytest plugins/communication_protocols/socket/tests/test_tcp_communication_protocol.py -v

# Filter by keyword (e.g., delimiter framing)
python -m pytest plugins/communication_protocols/socket/tests -k delimiter -q
  1. Optional end-to-end sanity check (mock UDP/TCP servers):
python scripts/socket_sanity.py

Notes:

  • On Windows, your firewall may prompt the first time tests open UDP/TCP sockets; allow access or run as admin if needed.
  • Tests use pytest-asyncio. The dev extras installed above provide required dependencies.
  • Streaming is single-chunk by design, consistent with HTTP/Text transports. Multi-chunk streaming can be added later behind provider configuration.