diff options
| author | historia <[not public]> | 2026-09-15 15:35:52 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-15 15:35:52 -0400 |
| commit | 0b0b25222b3131ada79ff78c28eb8bf07d977deb (patch) | |
| tree | 2ceaef5203595044f66a8f00064cd8e017f8f48d /internal/net/wsconn.go | |
| parent | 396c3facb8287b9a34076cae8f3d7b300d366d99 (diff) | |
| download | thehouseoficarus-0b0b25222b3131ada79ff78c28eb8bf07d977deb.tar.gz | |
feat: single-owner game state, transactional lifecycle, durable money on server stop
Diffstat (limited to 'internal/net/wsconn.go')
| -rw-r--r-- | internal/net/wsconn.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/net/wsconn.go b/internal/net/wsconn.go index 4990c0b..34663ba 100644 --- a/internal/net/wsconn.go +++ b/internal/net/wsconn.go @@ -1,6 +1,8 @@ package net import ( + "time" + "github.com/gorilla/websocket" ) @@ -25,6 +27,12 @@ func (w *wsConn) Write(b []byte) (int, error) { return len(b), err } +// SetWriteDeadline delegates to the underlying websocket connection, which +// supports deadlines natively. +func (w *wsConn) SetWriteDeadline(ts time.Time) error { + return w.conn.SetWriteDeadline(ts) +} + func (w *wsConn) Close() error { return w.conn.Close() } |
