Skip to content

Commit

Permalink
Merge pull request #412 from KunalSin9h/protocol
Browse files Browse the repository at this point in the history
Change protocol in docs and logs from http to ws
  • Loading branch information
nhooyr committed Oct 26, 2023
2 parents 8060f3a + 52721a9 commit 22c9092
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 22c9092

Please sign in to comment.