Skip to content

Commit

Permalink
Use ws:// over http:// in example logs
Browse files Browse the repository at this point in the history
  • Loading branch information
KunalSin9h authored and nhooyr committed Oct 26, 2023
1 parent 8060f3a commit 52721a9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/examples/chat/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This directory contains a full stack example of a simple chat webapp using nhooy
```bash
$ cd examples/chat
$ go run . localhost:0
listening on http://127.0.0.1:51055
listening on ws://127.0.0.1:51055
```

Visit the printed URL to submit and view broadcasted messages in a browser.
Expand Down
2 changes: 1 addition & 1 deletion internal/examples/chat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func run() error {
if err != nil {
return err
}
log.Printf("listening on http://%v", l.Addr())
log.Printf("listening on ws://%v", l.Addr())

cs := newChatServer()
s := &http.Server{
Expand Down
2 changes: 1 addition & 1 deletion internal/examples/echo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This directory contains a echo server example using nhooyr.io/websocket.
```bash
$ cd examples/echo
$ go run . localhost:0
listening on http://127.0.0.1:51055
listening on ws://127.0.0.1:51055
```

You can use a WebSocket client like https://github.com/hashrocket/ws to connect. All messages
Expand Down
2 changes: 1 addition & 1 deletion internal/examples/echo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func run() error {
if err != nil {
return err
}
log.Printf("listening on http://%v", l.Addr())
log.Printf("listening on ws://%v", l.Addr())

s := &http.Server{
Handler: echoServer{
Expand Down

0 comments on commit 52721a9

Please sign in to comment.