allows you to transfer packets (strings) between computers. connect network ports to both computers and connect them together (the direction of the connection does not matter)
you can use the "antenna" to transmit packets at a distance
component name - port
methods:
- clear() - clears the receiving buffer of the network port
- getUniqueId():number - returns the unique ID of the network port that can be used to send a private message
- nextPacket():string, number - returns the network packet and the unique port number from which it came. returns two nils if there are no packets in the buffer
- getPacketsCount():number - returns the number of packets that are waiting to be received using nextPacket
- getMaxPacketsCount():number - returns the number of packets that can fit in the receiving buffer
- send(packet:string) - sends a packet over a broadcast channel
- sendTo(uniqueId:number, packet:string) - sends a private packet to a network port with a specific ID
- sendTable(packet:table) - serializes the table into a string and sends it over broadcast
- sendTableTo(uniqueId:number, packet:table) - serializes the table as a row and sends it to a specific network port
- nextTable():table, number - takes a packet from the queue and tries to deserialize it as a table, returns the result only if it succeeded