Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davydog187/udp
An example of sending UDP packets between two containers
https://github.com/davydog187/udp
Last synced: 25 days ago
JSON representation
An example of sending UDP packets between two containers
- Host: GitHub
- URL: https://github.com/davydog187/udp
- Owner: davydog187
- Created: 2023-11-20T16:44:42.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-20T17:40:57.000Z (12 months ago)
- Last Synced: 2023-11-21T17:52:18.743Z (12 months ago)
- Language: Elixir
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# UDP
A small project that I used to build an understanding of how to send UDP packets between two Docker containers.
This project contains an Elixir program than runs in two modes, sender and receiver. The sender sends a message every 3 seconds to the destination address, and the receiver listens and prints the message.
To run, simply do:
## Run example of two containers talking over UDP
``` shell
$ docker compose up
```## Run example of container sending data to host service over UDP
1. Start the receiver `TYPE=receiver mix run`
2. Start the sender `docker compose -f docker-compose.host.yml up`## Related reading
- https://github.com/erlang/otp/issues/5092