Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/tricktux/network-exercises

Solution to the prothackers problems
https://github.com/tricktux/network-exercises

c catch2 cmake cmake-init linux makefile network-programming protohacker-solutions protohackers protohackers-solutions server socket-programming sockets zig

Last synced: 15 days ago
JSON representation

Solution to the prothackers problems

Awesome Lists containing this project

README

        

# network-exercises

This is the network-exercises project.

## 0: Smoke Test

Deep inside Initrode Global's enterprise management framework lies a component that writes data to a server and expects to read the same data back. (Think of it as a kind of distributed system delay-line memory). We need you to write the server to echo the data back.

Accept TCP connections.

Whenever you receive data from a client, send it back unmodified.

Make sure you don't mangle binary data, and that you can handle at least 5 simultaneous clients.

Once the client has finished sending data to you it shuts down its sending side. Once you've reached end-of-file on your receiving side, and sent back all the data you've received, close the socket so that the client knows you've finished. (This point trips up a lot of proxy software, such as ngrok; if you're using a proxy and you can't work out why you're failing the check, try hosting your server in the cloud instead).

Your program will implement the TCP Echo Service from RFC 862.

# Building and installing

See the [BUILDING](BUILDING.md) document.

# Contributing

See the [CONTRIBUTING](CONTRIBUTING.md) document.

# Licensing