Sign inSign up

jasonkeene/tcp-to-stdout

By jasonkeene

•Updated over 8 years ago

A simple program to accept connections, read from them, and write the result to stdout.

Image
0

533

jasonkeene/tcp-to-stdout repository overview

A simple program to accept connections, read from them, and write the result to stdout.

Why not use nc you ask? It doesn't handle multiple concurrent connections.

Why not inetd? Well, this is a lot simpler and took me two minutes to write.

⁠Usage

docker run \
    --publish 8080:8080 \
    jasonkeene/tcp-to-stdout

Then in another terminal:

nc localhost 8080

You can override the port it listens on with the env var ADDR. For instance:

docker run \
    --publish 9090:9090 \
    --env ADDR=:9090 \
    jasonkeene/tcp-to-stdout

Tag summary

Content type

Image

Digest

Size

3 MB

Last updated

over 8 years ago

docker pull jasonkeene/tcp-to-stdout