network: Implement isConnected to determine whether a connection socket is connected or not

This commit is contained in:
2026-06-02 13:46:41 +02:00
parent 227cf5c03e
commit 1250375063
+4
View File
@@ -251,6 +251,10 @@ pub const Host = struct {
} }
return num; return num;
} }
pub fn isConnected(_: *Host, socket: *ConnSocket) bool {
return socket.peer_conn != null;
}
}; };
gpa: Allocator, gpa: Allocator,