Skip to content

Commit

Permalink
changing ListenWS method that is no longer available (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronan Souza authored and lonng committed Aug 30, 2019
1 parent a40ba25 commit 0fe2e5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func main() {
http.Handle("/web/", http.StripPrefix("/web/", http.FileServer(http.Dir("web"))))

nano.SetCheckOriginFunc(func(_ *http.Request) bool { return true })
nano.ListenWS(":3250")
nano.Listen(":3250", nano.WithIsWebsocket(true))
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/get_started_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func main() {
http.Handle("/web/", http.StripPrefix("/web/", http.FileServer(http.Dir("web"))))

nano.SetCheckOriginFunc(func(_ *http.Request) bool { return true })
nano.ListenWS(":3250")
nano.Listen(":3250", nano.WithIsWebsocket(true))
}
```

Expand Down
3 changes: 2 additions & 1 deletion examples/demo/chat/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ func main() {
log.SetFlags(log.LstdFlags | log.Llongfile)
http.Handle("/web/", http.StripPrefix("/web/", http.FileServer(http.Dir("web"))))

nano.ListenWS(":3250",
nano.Listen(":3250",
nano.WithIsWebsocket(true),
nano.WithPipeline(pip),
nano.WithCheckOriginFunc(func(_ *http.Request) bool { return true }),
nano.WithWSPath("/nano"),
Expand Down

0 comments on commit 0fe2e5b

Please sign in to comment.