bn::link namespace
#include <bn_link.h>

Link communication related functions.

Contents

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.