Improve NextWriter documentation

This commit is contained in:
Gary Burd 2017-10-10 09:16:43 -07:00
parent c908dc801c
commit f918560c4c
1 changed files with 3 additions and 0 deletions

View File

@ -484,6 +484,9 @@ func (c *Conn) prepWrite(messageType int) error {
//
// There can be at most one open writer on a connection. NextWriter closes the
// previous writer if the application has not already done so.
//
// All message types (TextMessage, BinaryMessage, CloseMessage, PingMessage and
// PongMessage) are supported.
func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) {
if err := c.prepWrite(messageType); err != nil {
return nil, err