fix documentation

This commit is contained in:
Ola Holmström
2015-05-13 23:17:16 +02:00
parent 9f353b18a2
commit aedcbc9362
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ func (m *Melody) HandleMessage(fn func(*Session, []byte)) {
}
// Fires when a session has an error.
func (m *Melody) HandleError(fn handleErrorFunc) {
func (m *Melody) HandleError(fn func(*Session, error)) {
m.errorHandler = fn
}
+2 -2
View File
@@ -83,12 +83,12 @@ func (s *Session) readPump(messageHandler handleMessageFunc, errorHandler handle
}
}
// Write a message to session.
// Write message to session.
func (s *Session) Write(msg []byte) {
s.writeMessage(&envelope{t: websocket.TextMessage, msg: msg})
}
// Close a session.
// Close session.
func (s *Session) Close() {
s.writeMessage(&envelope{t: websocket.CloseMessage, msg: []byte{}})
}