namespace
#include <bn_link.h>
link Link communication related functions.
Functions
- void send(int data)
- Send a message to the other players.
-
auto receive() -> optional<link_
state> - Returns the current state of the communication with other players.
- void deactivate()
- Deactivates the communication with other players until send() or receive() are called.
Function documentation
void bn:: link:: send(int data)
Send a message to the other players.
Parameters | |
---|---|
data | Data to send, in the range [0..65533]. |
Keep in mind that the message can be lost before being received by other players.
optional<link_ state> bn:: link:: receive()
Returns the current state of the communication with other players.
Keep in mind that some messages can be lost before receiving them.