Skip to content

Commit

Permalink
some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rvflash committed Mar 4, 2019
1 parent 11ddb95 commit be8e46b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ func main() {
// creates a server with a logger and a recover on panic as middlewares.
r := tcp.Default()
r.ACK(func(c *tcp.Context) {
// new message received
// gets the request body
buf, err := c.ReadAll()
// new message received
// gets the request body
buf, err := c.ReadAll()
if err != nil {
c.Error(err)
}
// writes something as response
c.String(string(buf))
// writes something as response
c.String(string(buf))
})
err := r.Run(":9090") // listen and serve on 0.0.0.0:9090
if err != nil {
log.Fatalf("listen: %s", err)
log.Fatalf("listen: %s", err)
}
}
```

0 comments on commit be8e46b

Please sign in to comment.