Skip to content

Commit

Permalink
Merge branch 'patch-2' of https://github.com/robbiet480/melody
Browse files Browse the repository at this point in the history
  • Loading branch information
Ola Holmström committed Apr 13, 2017
2 parents a9e9ebd + 8a4d4f8 commit 339bebc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions melody.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ func (m *Melody) Len() int {
return m.hub.len()
}

// IsClosed returns the status of the melody instance.
func (m *Melody) IsClosed() bool {
return m.hub.closed()
}

// FormatCloseMessage formats closeCode and text as a WebSocket close message.
func FormatCloseMessage(closeCode int, text string) []byte {
return websocket.FormatCloseMessage(closeCode, text)
Expand Down

0 comments on commit 339bebc

Please sign in to comment.