Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(75)

Side by Side Diff: src/pkg/websocket/hybi.go

Issue 5345045: code review 5345045: renaming_3: gofix -r go1pkgrename src/pkg/[m-z]* (Closed)
Patch Set: diff -r 94794514aca0 https://go.googlecode.com/hg/ Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/websocket/hixie_test.go ('k') | src/pkg/websocket/hybi_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package websocket 5 package websocket
6 6
7 // This file implements a protocol of hybi draft. 7 // This file implements a protocol of hybi draft.
8 // http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 8 // http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17
9 9
10 import ( 10 import (
11 "bufio" 11 "bufio"
12 "bytes" 12 "bytes"
13 "crypto/rand" 13 "crypto/rand"
14 "crypto/sha1" 14 "crypto/sha1"
15 "encoding/base64" 15 "encoding/base64"
16 "encoding/binary" 16 "encoding/binary"
17 "fmt" 17 "fmt"
18 "http"
19 "io" 18 "io"
20 "io/ioutil" 19 "io/ioutil"
20 "net/http"
21 "net/url"
21 "strings" 22 "strings"
22 "url"
23 ) 23 )
24 24
25 const ( 25 const (
26 websocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" 26 websocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
27 27
28 closeStatusNormal = 1000 28 closeStatusNormal = 1000
29 closeStatusGoingAway = 1001 29 closeStatusGoingAway = 1001
30 closeStatusProtocolError = 1002 30 closeStatusProtocolError = 1002
31 closeStatusUnsupportedData = 1003 31 closeStatusUnsupportedData = 1003
32 closeStatusFrameTooLarge = 1004 32 closeStatusFrameTooLarge = 1004
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 540 }
541 541
542 func (c *hybiServerHandshaker) NewServerConn(buf *bufio.ReadWriter, rwc io.ReadW riteCloser, request *http.Request) *Conn { 542 func (c *hybiServerHandshaker) NewServerConn(buf *bufio.ReadWriter, rwc io.ReadW riteCloser, request *http.Request) *Conn {
543 return newHybiServerConn(c.Config, buf, rwc, request) 543 return newHybiServerConn(c.Config, buf, rwc, request)
544 } 544 }
545 545
546 // newHybiServerConn returns a new WebSocket connection speaking hybi draft prot ocol. 546 // newHybiServerConn returns a new WebSocket connection speaking hybi draft prot ocol.
547 func newHybiServerConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCl oser, request *http.Request) *Conn { 547 func newHybiServerConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCl oser, request *http.Request) *Conn {
548 return newHybiConn(config, buf, rwc, request) 548 return newHybiConn(config, buf, rwc, request)
549 } 549 }
OLDNEW
« no previous file with comments | « src/pkg/websocket/hixie_test.go ('k') | src/pkg/websocket/hybi_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b