Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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