Explorar o código

Improve NextWriter documentation

Gary Burd %!s(int64=8) %!d(string=hai) anos
pai
achega
f918560c4c
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      conn.go

+ 3 - 0
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
 // There can be at most one open writer on a connection. NextWriter closes the
 // previous writer if the application has not already done so.
 // 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) {
 func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) {
 	if err := c.prepWrite(messageType); err != nil {
 	if err := c.prepWrite(messageType); err != nil {
 		return nil, err
 		return nil, err