1
0
mirror of https://github.com/beego/bee.git synced 2025-07-04 16:40:19 +00:00

Add gorilla/websocket to vendor folder

This commit is contained in:
Faissal Elamraoui
2017-01-23 20:12:40 +01:00
parent 3f15b69bcc
commit c5f8b8d28e
12 changed files with 2143 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !go1.5
package websocket
import "io"
func (c *Conn) read(n int) ([]byte, error) {
p, err := c.br.Peek(n)
if err == io.EOF {
err = errUnexpectedEOF
}
if len(p) > 0 {
// advance over the bytes just read
io.ReadFull(c.br, p)
}
return p, err
}