[engine] Go WebSocket sunucu iskeleti + bağlantı yaşam döngüsü #21
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Go ile WS sunucusu (ör. coder/websocket veya gorilla). Her bağlantı kendi goroutine'inde; bağlan/kapat/heartbeat/reconnect yaşam döngüsü. SDK endpoint sözleşmesi (wss://.../ ) aynı kalır.
Uygulandı (branch:
go-rewrite):internal/ws/server.go— WS upgrade, bağlantı yaşam döngüsü (connect/disconnect),saQutping/pong heartbeat, bağlantı-başına tek-yazıcıwritePump. Endpoint sözleşmesi (herhangi path'te WS upgrade) korundu.go test -raceyeşil. (0.1.0 milestone'u #22 insan-onayına bağlı olduğundan açık bırakıldı.)Tamamlandı (go-rewrite).
internal/ws(server.go, client.go, hub.go, room.go, conn.go): gorilla/websocket upgrade endpoint, bağlantı yaşam döngüsü (Connect→writePump+pingLoop→readLoop→Disconnect), bağlantı başına tek-yazıcı goroutine, saQut heartbeat (ping/pong), graceful close. Test: ws_test.go + httpserver/contract_test.go (gerçek WS yaşam döngüsü).go test -raceyeşil.