conn_write.go 341 B

123456789101112131415
  1. // Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build go1.8
  5. package websocket
  6. import "net"
  7. func (c *Conn) writeBufs(bufs ...[]byte) error {
  8. b := net.Buffers(bufs)
  9. _, err := b.WriteTo(c.conn)
  10. return err
  11. }