aboutsummaryrefslogtreecommitdiff
path: root/lib/websocket/route.go
AgeCommit message (Collapse)Author
2026-01-03all: use SPDX license header formatShulhan
2023-12-13all: fix linter warnings reported by reviveShulhan
There are some reports that I disagree with revive, in example, code should not declare the type after variables. In my opinion, on some cases, declaring the type make the code more readable and explicit. Since I did not want to add new configuration file, we changes it and follow revive for now.
2023-07-01lib/websocket: prefix the error with function or method namesShulhan
Adding prefix provide better way to locate and debug the error in the future.
2022-06-09lib/websocket: refactoring codeShulhan
Replace assignment from using ":=" to use variable declaration with type. Rationale: clarity and minimize duplicate temporary variables with the same type.
2022-06-09lib/websocket: realign all struct to minimize allocationsShulhan
Changes, * Client: from 176 to 144 (-32 bytes) * ClientManager: from 64 to 40 (-24 bytes) * Request: from 88 to 72 (-16 bytes) * Response: from 40 to 24 (-16 bytes) * route: from 48 to 32 (-16 bytes) * Server: from 72 to 64 (-8 bytes) * ServerOptions: from 104 to 96 (s-8 bytes) Plus other structs in the tests.
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2020-01-22websocket: change the RouteHandler signature to return ResponseShulhan
Previously, the Response in RouteHandler is passed in parameter, which seems weird for handler. This commit, move the Response from parameter to return values.
2018-07-06Add implementation of websocket server and client (RFC 6455)Shulhan