evio/examples
Josh Baker cf82b88f7c SO_REUSEPORT
Just add "reuseport=true" to an address:

evio.Serve(events, "tcp://0.0.0.0:1234?reuseport=true")
2018-03-19 12:47:53 -07:00
..
echo-server SO_REUSEPORT 2018-03-19 12:47:53 -07:00
http-server return accurate local addr on open 2017-11-08 16:45:30 -07:00
redis-server return accurate local addr on open 2017-11-08 16:45:30 -07:00
README.md Update README.md 2017-10-30 06:08:07 -07:00

README.md

evio examples

echo-server

Runs on port 5000

go run examples/echo-server/main.go

Connect with telnet and start entering text.

telnet localhost 5000

http-server

Runs on port 8080

go run examples/http-server/main.go

Browse to http://localhost:8080. All requests print Hello World!.

redis-server

Runs on port 6380

go run examples/redis-server/main.go
  • GET, SET, DEL, FLUSHDB, QUIT, PING, ECHO, SHUTDOWN commands.
  • Compatible with the redis-cli and redis clients.