CTR Pia  4.11.3
Game Communication Engine
nn::pia::transport::ReliableBroadcastProtocol::Configuration Class Reference

Represents methods used to transfer data. More...

Public Member Functions

 Configuration ()
 Instantiates the object with default parameters (default constructor). Initialized with the same values as CURRENT_CONNECTION_SYNC.
 
bool IsFailIfRejected () const
 Gets the setting for determining whether a send operation had failed or been abandoned when the receiving station rejects a receive operation. More...
 
bool IsMediateRequest () const
 Gets the setting for determining whether a send operation automatically fails on one station if two stations try to send each other data at the same time. More...
 
bool IsSendEndless () const
 Gets the setting for determining whether to maintain a state of STATE_SENDING even after data has been sent to all receiving stations. More...
 
bool IsSendToNewcomer () const
 Gets whether to also send data to stations that join the session after the send operation begins. More...
 
bool IsSynchronizeCompletion () const
 Gets the setting that controls whether to synchronize the completion of receive operations. More...
 
void SetFailIfRejected (bool isOn)
 Sets whether to treat a send operation as a send failure and suspend sending data when a receiving station rejects receiving data. More...
 
void SetMediateRequest (bool isOn)
 Sets whether a send operation automatically fails on one station when two stations try to send data to each other at the same time. More...
 
void SetSendEndless (bool isOn)
 Sets whether the instance maintains a state of STATE_SENDING even after data has been successfully sent to all receiving stations. More...
 
void SetSendToNewcomer (bool isOn)
 Sets whether to also send data to stations that join the session after the send operation begins. More...
 
void SetSynchronizeCompletion (bool isOn)
 Sets whether to synchronize completion of receive operations. More...
 

Static Public Attributes

static const Configuration CURRENT_CONNECTION_ASYNC
 Represents the configuration for asynchronously sending data to currently connected stations. More...
 
static const Configuration CURRENT_CONNECTION_SYNC
 Represents the configuration for synchronized transfer of data to currently connected stations. More...
 
static const Configuration SHARE_DATA_ASYNC
 Represents the configuration for continuing to send data to stations that may join the session in addition to currently connected stations. More...
 
static const Configuration SHARE_DATA_SYNC
 Represents the configuration for sending data to any stations that may join the session, in addition to currently connected stations, and waits for all stations to finish receiving data. More...
 

Detailed Description

Represents methods used to transfer data.

We recommend you use the constants provided for typical cases, because some combinations of settings are meaningless.

Member Function Documentation

bool nn::pia::transport::ReliableBroadcastProtocol::Configuration::IsFailIfRejected ( ) const
inline

Gets the setting for determining whether a send operation had failed or been abandoned when the receiving station rejects a receive operation.

Returns
Returns true if the state transitions to STATE_SEND_FAILURE, and the entire send operation fails when a transmission is rejected. Returns false if only the rejected station does not receive the data, and the station continues to send to the other recipients.
See also
SetFailIfRejected
bool nn::pia::transport::ReliableBroadcastProtocol::Configuration::IsMediateRequest ( ) const
inline

Gets the setting for determining whether a send operation automatically fails on one station if two stations try to send each other data at the same time.

If this setting is true and there is a conflict between sending stations, the data being sent from the sending station with the largest StationIndex value fails. If two stations are sending data, and this setting is true for one and false for the other, the send operation sent from the station for which it is set to true fails. If the setting is false for both stations, each station maintains a state of STATE_SENDING while waiting for the other station to receive. Neither station ever completes its send operation unless the application handles this case appropriately.

Returns
Returns true if the station stops transmission and goes to the STATE_SEND_FAILURE state when it gets a receive request for which the IsMediateRequest returns false, or a receive request from a receiving station with a StationIndex lower than that of the local station. Returns false if the station does not automatically go to the STATE_SEND_FAILURE state, depending on the receive requests it gets from recipients.
See also
SetMediateRequest
bool nn::pia::transport::ReliableBroadcastProtocol::Configuration::IsSendEndless ( ) const
inline

Gets the setting for determining whether to maintain a state of STATE_SENDING even after data has been sent to all receiving stations.

If this is set to true, the state will not change to STATE_SEND_SUCCESS automatically. If you call the ReliableBroadcastProtocol::FinishSendEndless function, subsequent operations are the same as if false was specified for this setting. The state transitions to STATE_SEND_SUCCESS after data has been sent to all receiving stations.

Returns
Returns true if the STATE_SENDING state is to be maintained after data is sent to all receiving stations and also if data will be sent to any stations that join later. Returns false if the state changes to STATE_SEND_SUCCESS after data has been sent to all recipients and no more data will be sent.
See also
SetSendEndless
bool nn::pia::transport::ReliableBroadcastProtocol::Configuration::IsSendToNewcomer ( ) const
inline

Gets whether to also send data to stations that join the session after the send operation begins.

Returns
Returns true if data is also sent to stations that join the session while the send operation is ongoing. Returns false if data is sent only to stations that are in the session at the time that the send operation starts.
See also
SetSendToNewcomer
bool nn::pia::transport::ReliableBroadcastProtocol::Configuration::IsSynchronizeCompletion ( ) const
inline

Gets the setting that controls whether to synchronize the completion of receive operations.

Returns
Returns true if the state changes to STATE_RECEIVE_SUCCESS when all stations have finished receiving the data. Returns false if each station transitions to STATE_RECEIVE_SUCCESS when it has received all of the data.
See also
SetSynchronizeCompletion
void nn::pia::transport::ReliableBroadcastProtocol::Configuration::SetFailIfRejected ( bool  isOn)
inline

Sets whether to treat a send operation as a send failure and suspend sending data when a receiving station rejects receiving data.

For more information about the meaning of this setting, see the IsFailIfRejected function.

Parameters
[in]isOnSet to true to enable the setting.
See also
IsFailIfRejected
void nn::pia::transport::ReliableBroadcastProtocol::Configuration::SetMediateRequest ( bool  isOn)
inline

Sets whether a send operation automatically fails on one station when two stations try to send data to each other at the same time.

For more information about the meaning of this setting, see the IsMediateRequest function.

Parameters
[in]isOnSet to true to enable the setting.
See also
IsMediateRequest
void nn::pia::transport::ReliableBroadcastProtocol::Configuration::SetSendEndless ( bool  isOn)
inline

Sets whether the instance maintains a state of STATE_SENDING even after data has been successfully sent to all receiving stations.

For more information about the meaning of this setting, see the IsSendEndless function.

Parameters
[in]isOnSet to true to enable the setting.
See also
IsSendEndless
void nn::pia::transport::ReliableBroadcastProtocol::Configuration::SetSendToNewcomer ( bool  isOn)
inline

Sets whether to also send data to stations that join the session after the send operation begins.

For more information about the meaning of this setting, see the IsSendToNewcomer function.

Parameters
[in]isOnSet to true to enable the setting.
See also
IsSendToNewcomer
void nn::pia::transport::ReliableBroadcastProtocol::Configuration::SetSynchronizeCompletion ( bool  isOn)
inline

Sets whether to synchronize completion of receive operations.

For more information about the meaning of this setting, see the IsSynchronizeCompletion function.

Parameters
[in]isOnSet to true to enable the setting.
See also
IsSynchronizeCompletion

Member Data Documentation

const Configuration nn::pia::transport::ReliableBroadcastProtocol::Configuration::CURRENT_CONNECTION_ASYNC
static

Represents the configuration for asynchronously sending data to currently connected stations.

Unlike CURRENT_CONNECTION_SYNC, this configuration assumes that receiving stations do not need to wait for data to be delivered to other receiving stations.

  • IsSendToNewcomer: false
  • IsSynchronizeCompletion: false
  • IsSendEndless: false
  • IsFailIfRejected: false
  • IsMediateRequest: true
const Configuration nn::pia::transport::ReliableBroadcastProtocol::Configuration::CURRENT_CONNECTION_SYNC
static

Represents the configuration for synchronized transfer of data to currently connected stations.

This configuration assumes that stations will proceed to the next state in the sequence if one of the stations can successfully send data to all of the other stations after the deadline for joining the session has passed.

  • IsSendToNewcomer: false
  • IsSynchronizeCompletion: true
  • IsSendEndless: false
  • IsFailIfRejected: true
  • IsMediateRequest: true
const Configuration nn::pia::transport::ReliableBroadcastProtocol::Configuration::SHARE_DATA_ASYNC
static

Represents the configuration for continuing to send data to stations that may join the session in addition to currently connected stations.

This setting is for a use case where specific data is sent to stations as they join the session. The stations then proceed to the next sequence in the order they receive the data.

  • IsSendToNewcomer: true
  • IsSynchronizeCompletion: false
  • IsSendEndless: true
  • IsFailIfRejected: false
  • IsMediateRequest: false
const Configuration nn::pia::transport::ReliableBroadcastProtocol::Configuration::SHARE_DATA_SYNC
static

Represents the configuration for sending data to any stations that may join the session, in addition to currently connected stations, and waits for all stations to finish receiving data.

This configuration assumes that data being shared is sent in advance while awaiting matchmaking, that sending is ended by FinishSendEndless after matchmaking ends, and that all stations then proceed to the next state in the sequence.

  • IsSendToNewcomer: true
  • IsSynchronizeCompletion: true
  • IsSendEndless: true
  • IsFailIfRejected: true
  • IsMediateRequest: false