https://github.com/nuxy/netsock_ping_pong
Ping Pong(ing) within a network using Erlang/OTP :rotating_light: Work On Hold :rotating_light:
https://github.com/nuxy/netsock_ping_pong
danger discovery fun prototype useless
Last synced: 11 months ago
JSON representation
Ping Pong(ing) within a network using Erlang/OTP :rotating_light: Work On Hold :rotating_light:
- Host: GitHub
- URL: https://github.com/nuxy/netsock_ping_pong
- Owner: nuxy
- License: mit
- Created: 2023-02-09T20:51:52.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-13T19:25:17.000Z (over 3 years ago)
- Last Synced: 2025-01-16T04:25:53.975Z (over 1 year ago)
- Topics: danger, discovery, fun, prototype, useless
- Language: Erlang
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# netsock_ping_pong
Ping Pong(ing) within a network using Erlang/OTP.
The idea is pretty simple.
- First `HOST:PORT` available gets to serve (0 Love).
- When target `HOST:PORT` is not available (1 point).
- When target is available the request is returned.
- If both `HOST1:PORT=HOST2:PORT` (net-cointoss).
- `HOST` changes `PORT` for every action.
- Game play is based on how fast `PORT` is exposed.
## Dependencies
- [Visual Studio Code](https://code.visualstudio.com/download)
- [Docker](https://docs.docker.com/get-docker)
## Launching in Remote-Containers
In the VS Code _Command Palette_ choose "Open Folder in Container" which will launch the server in a Docker container allowing for realtime development and testing.
## Developers
### CLI options
Compile package sources:
$ make build
Start the program:
```text
Eshell v13.1.4 (abort with ^G)
1> netsock_ping_pong:main().
```
Run the [Common Test](https://www.erlang.org/doc/man/ct_run.html) suite:
$ make test
Clean up build/test output:
$ make clean
## References
- [gen_tcp - Interface to TCP/IP sockets](https://www.erlang.org/doc/man/gen_tcp.html)
- [net_adm - Net administration routines](https://www.erlang.org/doc/man/net_adm.html)