Skip to content

Network.WS.Server

Name Mandatory Description Default Type
⬅️ Input The input of this shard is ignored. Any
Output ➡️ The server object created. Server
Address No The local bind address or the remote address. none StringVar(String)
Port No The port to bind if server or to connect to if client. none IntVar(Int)
Handler No The wire to spawn for each new peer that connects, stopping that wire will break the connection. none NoneWire[Shard]
Timeout No The timeout in seconds after which a peer will be disconnected if there is no network activity. none Float
OnDisconnect No The shards to execute when a peer disconnects, The Peer ID will be the input. none Shard[Shard]None

This shard sets up a Websocket network server using TCP, on the address and port specified in the Address and Port parameters. This server then handles client connections and disconnections, messages received from clients and broadcasting messages to these clients.