aboutsummaryrefslogtreecommitdiff
path: root/lib/websocket/server_options.go
AgeCommit message (Collapse)Author
2026-01-03all: use SPDX license header formatShulhan
2023-07-01lib/websocket: handle concurrent ping using goroutinesShulhan
The maximum goroutines is quarter of max queue. The new goroutine for pinger will be dispatched when no goroutine can consume the current processed connection.
2023-07-01lib/websocket: handle concurrent Server read using goroutinesShulhan
The Server now dispatch a goroutine to consume event from poll reader for each client connection that is ready to read. The maximum number of goroutine is defined in ServerOptions maxGoroutineReader, which currently set to 1024.
2023-07-01lib/websocket: handle concurrent upgrade using goroutineShulhan
The maxGoroutineUpgrader define maximum goroutines running at the same time to handle client upgrade. The new goroutine only dispatched when others are full, so it will run incrementally not all at once. Default to defServerMaxGoroutineUpgrader (128) if its not set.
2023-06-29lib/websocket: add option to set read/write timeout on ServerShulhan
The ReadWriteTimeout define the maximum duration the server wait when receiving/sending packet from/to client before considering the connection as broken. Default read-write timeout is 30 seconds if not set. This changes affect the exported function Send and Recv by adding additional parameter timeout to both of them.
2022-07-29lib/websocket: reformat and paraphrase some commentsShulhan
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.
2020-08-11websocket: remove logging on ServerOptions.init()Shulhan
2020-08-11websocket: move the server handler to ServerOptionsShulhan
2020-08-11websocket: add server options to change the connect and status pathsShulhan
Previously, there is only one option for server, the port where it will listen. This changes add option to change the connect path (default to "/" previously) and new path and handler for retrieving server status.