Network
Appearance
The NetworkUD component allows sending network packets to other Computers, connected via Network Cables, Network Routers and Wan Routers. Upon sending a packet, the shortest path is calculated (only utilizing WAN routers if absolutely necessary), and after some time (which depends on the distance) the packet is emitted on the destination computer in the form of a network machine event, as described in Computer#Machine events.
A packet will only be received on the destination computer if the destination's port is open.
| Name | Type | Read/Write | Description |
|---|---|---|---|
maxPacketSize |
integer |
READ | The maximum amount of characters in a network message. Set in the server's config. |
| Name | Returns | Description |
|---|---|---|
:send(address:string, port:int, message:string)
|
void
|
Sends a message to the target computer. |
:openPort(port:int)
|
boolean
|
Opens the given local port. Returns true if the port was not open previously.
|