mirror of https://github.com/gorilla/websocket.git
Improve NextWriter documentation
This commit is contained in:
parent
c908dc801c
commit
f918560c4c
3
conn.go
3
conn.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue