mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 15:52:04 +00:00
feat(multiplayer): add Steam transport foundation
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
class_name NetTransport
|
||||
extends RefCounted
|
||||
|
||||
# Narrow construction boundary for Godot's MultiplayerPeer implementations.
|
||||
# NetworkManager owns polling, RPC policy, and lifecycle; a transport only
|
||||
# creates a peer. Keeping that split means ENet remains a first-class path
|
||||
# while Steam can use SDR without duplicating the rest of the networking code.
|
||||
|
||||
func transport_id() -> String:
|
||||
return ""
|
||||
|
||||
|
||||
func is_available() -> bool:
|
||||
return false
|
||||
|
||||
|
||||
func unavailable_reason() -> String:
|
||||
return "transport is unavailable"
|
||||
|
||||
|
||||
func create_server(_port: int, _max_clients: int) -> Dictionary:
|
||||
return {"error": ERR_UNAVAILABLE, "peer": null, "reason": unavailable_reason()}
|
||||
|
||||
|
||||
func create_client(_address: String, _port: int) -> Dictionary:
|
||||
return {"error": ERR_UNAVAILABLE, "peer": null, "reason": unavailable_reason()}
|
||||
Reference in New Issue
Block a user