From 1c06b81caef828122aaced8cbb465d38091b4171 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 26 Apr 2018 22:54:43 +0200 Subject: [PATCH] added default ws.frame types --- internal/ws/frame/opcode/types.go | 34 ------------------------------- internal/ws/frame/types.go | 20 ------------------ 2 files changed, 54 deletions(-) delete mode 100644 internal/ws/frame/opcode/types.go delete mode 100644 internal/ws/frame/types.go diff --git a/internal/ws/frame/opcode/types.go b/internal/ws/frame/opcode/types.go deleted file mode 100644 index 87b968f..0000000 --- a/internal/ws/frame/opcode/types.go +++ /dev/null @@ -1,34 +0,0 @@ -package opcode - -import ( - "git.xdrm.io/gws/internal/ws/frame" -) - -// Represents OpCode Values -const ( - // frame continuation - CONTINUATION frame.OpCode = 0x00 - - // frame type - TEXT frame.OpCode = 0x01 - BINARY frame.OpCode = 0x02 - - // reserved for non-control frames - RSV1 frame.OpCode = 0x03 - RSV2 frame.OpCode = 0x04 - RSV3 frame.OpCode = 0x05 - RSV4 frame.OpCode = 0x06 - - // connection close - CLOSE frame.OpCode = 0x08 - - // ping pong - PING frame.OpCode = 0x09 - PONG frame.OpCode = 0x0A - - // reserved for control frames - CRSV1 frame.OpCode = 0x0B - CRSV2 frame.OpCode = 0x0C - CRSV3 frame.OpCode = 0x0D - CRSV4 frame.OpCode = 0x0E -) \ No newline at end of file diff --git a/internal/ws/frame/types.go b/internal/ws/frame/types.go deleted file mode 100644 index bd2d591..0000000 --- a/internal/ws/frame/types.go +++ /dev/null @@ -1,20 +0,0 @@ -package frame - -// Represents an OpCode -type OpCode byte - - - -// Represents a frame metadata -type FrameMeta struct { - fin bool - opc OpCode - msk []byte // len: 4 if set, else empty -} - -// Represents a frame payload -type Frame struct { - met FrameMeta - buf []byte - len uint64 -} \ No newline at end of file