update control message doc

add default handler in the control message part
This commit is contained in:
Pierre PACI 2017-11-19 17:59:05 +01:00 committed by GitHub
parent 7ca4275b84
commit c6e8ef86f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

5
doc.go
View File

@ -95,9 +95,14 @@
// functions are called from the NextReader, ReadMessage and the message Read
// methods.
//
// Connections handle comes with default handler which can be overrided:
// The default ping handler sends a pong to the peer. The application's reading
// goroutine can block for a short time while the handler writes the pong data
// to the connection.
// The default pong handler does nothing.
// The default close handler sends a close frame back to the peer. Like with ping,
// the goroutine can block for a short time while the handler writes the close data
// to the connection.
//
// The application must read the connection to process ping, pong and close
// messages sent from the peer. If the application is not otherwise interested