commit 25f94dc76720beb573470143f10979911af4b370 Author: David Fifield david@bamsoftware.com Date: Mon Nov 26 04:07:29 2012 -0800
fmt. --- websocket-transport/websocket-server.go | 4 ++-- websocket-transport/websocket.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/websocket-transport/websocket-server.go b/websocket-transport/websocket-server.go index e4ab144..76c51d6 100644 --- a/websocket-transport/websocket-server.go +++ b/websocket-transport/websocket-server.go @@ -26,8 +26,8 @@ func logDebug(format string, v ...interface{}) { }
type websocketConn struct { - Ws *websocket - Base64 bool + Ws *websocket + Base64 bool messageBuf []byte }
diff --git a/websocket-transport/websocket.go b/websocket-transport/websocket.go index 71cc4be..7dc1a7e 100644 --- a/websocket-transport/websocket.go +++ b/websocket-transport/websocket.go @@ -16,7 +16,7 @@ import ( )
type websocketConfig struct { - Subprotocols []string + Subprotocols []string MaxMessageSize uint64 }
@@ -28,18 +28,18 @@ func (config *websocketConfig) maxMessageSize() uint64 { }
type websocket struct { - Conn net.Conn - Bufrw *bufio.ReadWriter + Conn net.Conn + Bufrw *bufio.ReadWriter // Whether we are a client or a server implications for masking. - IsClient bool + IsClient bool MaxMessageSize uint64 - Subprotocol string - messageBuf bytes.Buffer + Subprotocol string + messageBuf bytes.Buffer }
type websocketFrame struct { - Fin bool - Opcode byte + Fin bool + Opcode byte Payload []byte }
@@ -48,13 +48,13 @@ func (frame *websocketFrame) IsControl() bool { }
type websocketMessage struct { - Opcode byte + Opcode byte Payload []byte }
func applyMask(payload []byte, maskKey [4]byte) { for i, _ := range payload { - payload[i] = payload[i] ^ maskKey[i % 4] + payload[i] = payload[i] ^ maskKey[i%4] } }
tor-commits@lists.torproject.org