22 lines
No EOL
3.3 KiB
HTML
22 lines
No EOL
3.3 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>Network — Ludic</title>
|
||
<meta name="description" content="The low-level networking seam — send and poll datagrams, serialize and apply entity state, and read ownership and role.">
|
||
<link rel="stylesheet" href="base.css">
|
||
<link rel="stylesheet" href="docs.css">
|
||
</head>
|
||
<body>
|
||
<header class="nav"><div class="wrap nav-in"><a class="brand" href="index.html"><span class="logo">L</span> Ludic</a><button class="nav-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button><nav class="nav-links"><a href="index.html">Home</a><a href="api.html">API Reference</a><a class="nav-cta" href="https://git.workshopsoft.io/workshopsoft/ludic">Source ↗</a></nav></div></header>
|
||
<main class="wrap item">
|
||
<div class="crumbs"><a href="api.html">API Reference</a> <span>›</span> <span class="here">Network</span></div>
|
||
<div class="item-head"><span class="kind-badge kind-namespace">namespace</span><h1 id="top">Network</h1></div>
|
||
<p class="ns-blurb">The low-level networking seam — send and poll datagrams, serialize and apply entity state, and read ownership and role. Multiplayer is normally a compile-time property of the ECS, not glue you thread by hand: mark fields <code>@Sync</code> and models <code>@Owned</code> and the compiler generates the replication. These <code>Network.*</code> primitives are what that sugar lowers to, for when you drive the transport yourself. Offline they collapse to single-player defaults.</p>
|
||
<div class="ns-methods"><a class="ns-method" href="network-send.html"><code class="nm-sig">Network.send(peer, buf, len) -> void</code><span class="nm-tip">Put a datagram on the wire.</span></a><a class="ns-method" href="network-poll.html"><code class="nm-sig">Network.poll(buf, cap) -> int</code><span class="nm-tip">Read an inbound datagram.</span></a><a class="ns-method" href="network-serialize.html"><code class="nm-sig">Network.serialize(entity, buf) -> int</code><span class="nm-tip">Serialize an entity's synced state.</span></a><a class="ns-method" href="network-apply.html"><code class="nm-sig">Network.apply(entity, buf) -> int</code><span class="nm-tip">Apply serialized state to an entity.</span></a><a class="ns-method" href="network-owner.html"><code class="nm-sig">Network.owner(entity) -> int</code><span class="nm-tip">The peer that owns an entity.</span></a><a class="ns-method" href="network-set_owner.html"><code class="nm-sig">Network.set_owner(entity, peer) -> void</code><span class="nm-tip">Assign ownership of an entity.</span></a><a class="ns-method" href="network-is_server.html"><code class="nm-sig">Network.is_server() -> bool</code><span class="nm-tip">Is this peer the server?</span></a><a class="ns-method" href="network-is_owner.html"><code class="nm-sig">Network.is_owner(entity) -> bool</code><span class="nm-tip">Does this peer own the entity?</span></a><a class="ns-method" href="network-local_id.html"><code class="nm-sig">Network.local_id() -> int</code><span class="nm-tip">This peer's own id.</span></a></div>
|
||
<a class="back" href="api.html">← All symbols</a>
|
||
</main>
|
||
<script src="ludic-highlight.js"></script>
|
||
<script>Ludic.installCards(); Ludic.flashTarget();</script>
|
||
</body></html> |