Skip to content

Change protocol in docs and logs from http to ws #412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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