aboutsummaryrefslogtreecommitdiff
path: root/lib/websocket/opcode.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2019-03-04 16:36:06 +0700
committerShulhan <ms@kilabit.info>2019-03-04 17:00:44 +0700
commitcc01134fc9316c16de286cb221d1505d4f91dd5e (patch)
treed6ce8603152a6a1ba4712d5d540704f0d91ae22e /lib/websocket/opcode.go
parentcb3490c2b6e99b503b1635cce5f5537e554eee90 (diff)
downloadpakakeh.go-cc01134fc9316c16de286cb221d1505d4f91dd5e.tar.xz
websocket: remove global variables for server control frames
This changes introduced new parameters isMasked and close code status to function NewFrameClose; and isMasked to function NewFramePing and NewFramePong. This commit also introduce new type for status code: CloseCode.
Diffstat (limited to 'lib/websocket/opcode.go')
-rw-r--r--lib/websocket/opcode.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/websocket/opcode.go b/lib/websocket/opcode.go
index 8df24aff..a0872338 100644
--- a/lib/websocket/opcode.go
+++ b/lib/websocket/opcode.go
@@ -11,9 +11,9 @@ type opcode byte
//
const (
opcodeCont opcode = 0x0
- opcodeText = 0x1
- opcodeBin = 0x2
- opcodeClose = 0x8
- opcodePing = 0x9
- opcodePong = 0xA
+ opcodeText opcode = 0x1
+ opcodeBin opcode = 0x2
+ opcodeClose opcode = 0x8
+ opcodePing opcode = 0x9
+ opcodePong opcode = 0xA
)