Network Card

Functions

broadcast (port : Int, …​)

Sends a network message to all components in the network message network (including networks sepperated by network routers) on the given port. The data you want to add can be passed as additional parameters. Max amount of such parameters is 7 and they can only be nil, booleans, numbers and strings.

Details

Flags

VarArgs RuntimeSync RuntimeParallel MemberFunc

Display Name

Broadcast Message

Parameters
Name Type Description

Port port

Int

The port on which the network message should get sent. For outgoing network messages a port does not need to be opened.

closeAll ()

Closes all ports of the network card so no further messages are able to get received

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Close All Ports

close (port : Int)

Closes the given port so the network card wont receive network messages on the given port.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Close Port

Parameters
Name Type Description

Port port

Int

The port you want to close.

open (port : Int)

Opens the given port so the network card is able to receive network messages on the given port.

Details

Flags

RuntimeSync RuntimeParallel MemberFunc

Display Name

Open Port

Parameters
Name Type Description

Port port

Int

The port you want to open.

send (receiver : String, port : Int, …​)

Sends a network message to the receiver with the given address on the given port. The data you want to add can be passed as additional parameters. Max amount of such parameters is 7 and they can only be nil, booleans, numbers and strings.

Details

Flags

VarArgs RuntimeSync RuntimeParallel MemberFunc

Display Name

Send Message

Parameters
Name Type Description

Receiver receiver

String

The component ID as string of the component you want to send the network message to.

Port port

Int

The port on which the network message should get sent. For outgoing network messages a port does not need to be opened.

Signals

NetworkMessage (String Sender sender, Int Port port, …​)

Triggers when the network card receives a network message on one of its opened ports. The additional arguments are the data that is contained within the network message.

Details
Parameters
Name Type Description

Sender sender

String

The component id of the sender of the network message.

Port port

Int

The port on which the network message got sent.