mchess-server/go.mod
Marco d951fab25b Implement ringbuffer for websocket messages
This implements a ringbuffer that is used to decouple the raw websocket
connection from the messages that the game handler handles.

There is still a problem:
Test_MessageBuffer_GetWaitsForNewDataIfOldOneWasAlreadyGotten fails
because buf.Get() returns an old value instead of waiting for a new one.
This must be fixed.

Additionally, the Insert() and Get() methods must be thread-safe at
some point. But since Get() blocks when there is no data, there would be
a deadlock if I see this right.
2023-11-20 02:08:21 +01:00

47 lines
1.8 KiB
Modula-2

module mchess_server
go 1.21.1
require (
github.com/gin-gonic/gin v1.9.1
github.com/google/uuid v1.4.0
github.com/samber/lo v1.38.1
github.com/stretchr/testify v1.8.4
github.com/tjarratt/babble v0.0.0-20210505082055-cbca2a4833c1
nhooyr.io/websocket v1.8.10
)
require (
github.com/bytedance/sonic v1.10.2 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
github.com/chenzhuoyu/iasm v0.9.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.16.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.10 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
golang.org/x/arch v0.6.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)