mkdir gnalloy-app && cd gnalloy-app
go mod init example.com/gnalloy-app
go get gnalloy.org/codec-websocket@dev
go doc gnalloy.org/codec-websocketThe current source tree exposes these package import paths:
gnalloy.org/codec-websocketgnalloy.org/codec-websocket/deflate
Use go doc against the package that matches the behavior you need:
go doc gnalloy.org/codec-websocket
go doc gnalloy.org/codec-websocket/deflateSelected current exported entry points:
const OpcodeContinuation = 0x0 ...const CloseStatusNormalClosure uint16 = 1000 ...var ErrInvalidHandshake = errors.New("gnalloy/codec/websocket: invalid websocket handshake") ...func AcceptKey(key string) stringfunc IsUpgradeRequest(req http1.Request) boolfunc IsValidCloseStatusCode(code uint16) boolconst FrameExtensionName = "deflate-frame" ...const DefaultMaxMessageBytes = 32 << 20const ExtensionName = "permessage-deflate"var ErrInvalidConfig = errors.New("gnalloy/codec/websocket/deflate: invalid config") ...func Offer(params Parameters) stringfunc OfferFrameExtension() string
Repository tests are executable examples of supported behavior. Start with the selected names below, then read the matching _test.go files for complete setup and assertions. See Testing and Performance for the complete discovered list.
GOWORK=off GOTOOLCHAIN=local go test ./... -run Test -count=1Selected current test, benchmark, fuzz, and example entry points:
BenchmarkCompressMessageBenchmarkCompressorCompositePayloadBenchmarkDecompressMessageBenchmarkDecompressorPayloadBenchmarkFrameDecoderMaskedFragmentedPayloadBenchmarkFrameEncoderMaskedCompositePayloadFuzzWebSocketFrameDecoderTestAcceptKeyMatchesRFCExampleTestClientFrameDecoderRejectsMaskedServerFrameTestClientHandshakeRejectsInvalidResponseTestClientHandshakeWritesRequestAndValidatesResponseTestCompressorDecompressorRoundTripTestCompressorPassesControlFramesTestControlFrameHandlerEchoesCloseAndClosesChannelTestControlFrameHandlerRespondsToPingTestControlFrameHandlerTracksOutboundCloseStateTestDecompressorRejectsControlRSVTestDecompressorRejectsInflatedLimit
Direct Gnalloy dependencies for this module:
gnalloy.org/codec-http1gnalloy.org/gnalloygnalloy.org/handler-timeout
Assembly guidance:
- Use this codec above a byte-oriented or datagram transport and below application handlers.
- The codec converts bytes or Gnalloy messages into protocol objects and converts outbound protocol objects back to bytes.
- It does not open sockets, own EventLoops, or define application lifecycle.
For sustained load, wire this module into a scenario under gnalloy.org/benchmarks or a runnable client under gnalloy.org/examples when the module participates in network traffic. Record host, OS, CPU, Go version, protocol, payload, concurrency, warmup, repetitions, throughput, and p99 latency in the report.