rename
This commit is contained in:
@@ -11,21 +11,21 @@ Melody is websocket framework based on [github.com/gorilla/websocket](https://gi
|
||||
that abstracts away the tedious parts of handling websockets. It gets out of
|
||||
your way so you can write real-time apps. Features include:
|
||||
|
||||
* [x] Clear and easy interface similar to `net/http` or Gin.
|
||||
* [x] A simple way to broadcast to all or selected connected sessions.
|
||||
* [x] Message buffers making concurrent writing safe.
|
||||
* [x] Automatic handling of sending ping/pong heartbeats that timeout broken sessions.
|
||||
* [x] Store data on sessions.
|
||||
- [x] Clear and easy interface similar to `net/http` or Gin.
|
||||
- [x] A simple way to broadcast to all or selected connected sessions.
|
||||
- [x] Message buffers making concurrent writing safe.
|
||||
- [x] Automatic handling of sending ping/pong heartbeats that timeout broken sessions.
|
||||
- [x] Store data on sessions.
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
go get github.com/olahol/melody
|
||||
go get git.company.lan/gopkg/melody
|
||||
```
|
||||
|
||||
## [Example: chat](https://github.com/olahol/melody/tree/master/examples/chat)
|
||||
## [Example: chat](https://git.company.lan/gopkg/melody/tree/master/examples/chat)
|
||||
|
||||
[](https://github.com/olahol/melody/tree/master/examples/chat)
|
||||
[](https://git.company.lan/gopkg/melody/tree/master/examples/chat)
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -33,7 +33,7 @@ package main
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/olahol/melody"
|
||||
"git.company.lan/gopkg/melody"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -55,9 +55,9 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
## [Example: gophers](https://github.com/olahol/melody/tree/master/examples/gophers)
|
||||
## [Example: gophers](https://git.company.lan/gopkg/melody/tree/master/examples/gophers)
|
||||
|
||||
[](https://github.com/olahol/melody/tree/master/examples/gophers)
|
||||
[](https://git.company.lan/gopkg/melody/tree/master/examples/gophers)
|
||||
|
||||
```go
|
||||
package main
|
||||
@@ -66,8 +66,8 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"git.company.lan/gopkg/melody"
|
||||
"github.com/google/uuid"
|
||||
"github.com/olahol/melody"
|
||||
)
|
||||
|
||||
type GopherInfo struct {
|
||||
@@ -137,7 +137,7 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
### [More examples](https://github.com/olahol/melody/tree/master/examples)
|
||||
### [More examples](https://git.company.lan/gopkg/melody/tree/master/examples)
|
||||
|
||||
## [Documentation](https://godoc.org/github.com/olahol/melody)
|
||||
|
||||
@@ -149,7 +149,7 @@ func main() {
|
||||
|
||||
## FAQ
|
||||
|
||||
If you are getting a `403` when trying to connect to your websocket you can [change allow all origin hosts](http://godoc.org/github.com/gorilla/websocket#hdr-Origin_Considerations):
|
||||
If you are getting a `403` when trying to connect to your websocket you can [change allow all origin hosts](http://godoc.org/github.com/gorilla/websocket#hdr-Origin_Considerations):
|
||||
|
||||
```go
|
||||
m := melody.New()
|
||||
|
||||
Reference in New Issue
Block a user