v0.1.2
TCP Echo server. RFC862 implementation.
package main
import (
"context"
"github.com/boratanrikulu/echo"
)
func main() {
s := echo.NewServer().
Address(":1337").
Banner(true).
Verbose(false)
ctx := context.Background()
s.Run(ctx)
}
_
| |
___ ___ | |__ ___
/ _ \ / __| | '_ \ / _ \
| __/ | (__ | | | | | (_) |
\___| \___| |_| |_| \___/
Usage: echo [options]
Options:
-a, --address, which interface and port will be used *[example: ":1337"]
-n, --no-banner
-v, --verbose
-h, --help
* means "must be set".
It lives at echo.bora.sh:1337.
You can try it using telnet.
telnet echo.bora.sh 1337
To run tests,
go test ./... -v -cover -count=1 -race
To run server,
go run ./cmd --address :1337
To run server with Docker,
docker build -t echo .
docker run --rm -i -t -p 1337:1337 echo --address :1337