Marco
bb817ad3af
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. |
||
---|---|---|
.. | ||
message_buffer_test.go | ||
message_buffer.go | ||
type.go |