From cc01134fc9316c16de286cb221d1505d4f91dd5e Mon Sep 17 00:00:00 2001 From: Shulhan Date: Mon, 4 Mar 2019 16:36:06 +0700 Subject: 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. --- lib/websocket/opcode.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/websocket/opcode.go') 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 ) -- cgit v1.3-6-g1900