aboutsummaryrefslogtreecommitdiff
path: root/lib/websocket/opcode.go
AgeCommit message (Collapse)Author
2026-01-03all: use SPDX license header formatShulhan
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2019-10-21all: fix and add missing commentsShulhan
2019-03-12websocket: export the opcode typeShulhan
The opcode type is required to create new frame and to get the opcode in continous frames.
2019-03-10websocket: add server handler for reserved control frameShulhan
The handler is called HandlerRsvControl that can be set before running the server. Default HandlerRsvControl is nil. Since the handler expect Frame as parameter, we need to adjust and add two methods to access Frame's internal fields and methods; which is exporting NewFrame function and Frame.Pack method, and adding method Opcode() and Payload() to access Frame's opcode and payload.
2019-03-04websocket: remove global variables for server control framesShulhan
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.
2019-03-04websocket: minimize global variables and unexport internal constantsShulhan
Most of the constants should not be used directly, as we prefer user to use the functions or methods based access.