Photon Fusion 2.0.9

Public Member Functions | List of all members
INetPeerGroupCallbacks Interface Reference

Defines the callbacks for network peer group events. More...

Inherited by Simulation.

Public Member Functions

void OnConnected (NetConnection *connection)
 Called when a connection is established. More...
 
void OnConnectionAttempt (NetConnection *connection, int attempts, int totalConnectAttempts)
 Called when a connection attempt is made. More...
 
void OnConnectionFailed (NetAddress address, NetConnectFailedReason reason)
 Called when a connection attempt fails. More...
 
OnConnectionRequestReply OnConnectionRequest (NetAddress remoteAddress, byte[] token, byte[] uniqueId)
 Called when a connection request is received. More...
 
void OnDisconnected (NetConnection *connection, NetDisconnectReason reason)
 Called when a connection is disconnected. More...
 
void OnNotifyData (NetConnection *connection, NetBitBuffer *buffer)
 Called when notify data is received. More...
 
void OnNotifyDelivered (NetConnection *connection, ref NetSendEnvelope envelope)
 Called when notify data is delivered. More...
 
void OnNotifyDispose (ref NetSendEnvelope envelope)
 Called when a notify envelope is disposed. More...
 
void OnNotifyLost (NetConnection *connection, ref NetSendEnvelope envelope)
 Called when notify data is lost. More...
 
void OnReliableData (NetConnection *connection, ReliableId id, byte *data)
 Called when reliable data is received. More...
 
void OnUnconnectedData (NetBitBuffer *buffer)
 Called when unconnected data is received. More...
 
void OnUnreliableData (NetConnection *connection, NetBitBuffer *buffer)
 Called when unreliable data is received. More...
 

Detailed Description

Defines the callbacks for network peer group events.

Member Function Documentation

◆ OnConnected()

void OnConnected ( NetConnection connection)

Called when a connection is established.

Parameters
connectionThe connection that was established.

◆ OnConnectionAttempt()

void OnConnectionAttempt ( NetConnection connection,
int  attempts,
int  totalConnectAttempts 
)

Called when a connection attempt is made.

Parameters
connectionThe connection being attempted.
attemptsThe number of attempts made.
totalConnectAttemptsThe total number of connection attempts.

◆ OnConnectionFailed()

void OnConnectionFailed ( NetAddress  address,
NetConnectFailedReason  reason 
)

Called when a connection attempt fails.

Parameters
addressThe address of the remote peer.
reasonThe reason for the connection failure.

◆ OnConnectionRequest()

OnConnectionRequestReply OnConnectionRequest ( NetAddress  remoteAddress,
byte[]  token,
byte[]  uniqueId 
)

Called when a connection request is received.

Parameters
remoteAddressThe address of the remote peer.
tokenThe token associated with the connection request.
uniqueIdThe unique identifier for the connection request.
Returns
The reply to the connection request.

◆ OnDisconnected()

void OnDisconnected ( NetConnection connection,
NetDisconnectReason  reason 
)

Called when a connection is disconnected.

Parameters
connectionThe connection that was disconnected.
reasonThe reason for disconnection.

◆ OnNotifyData()

void OnNotifyData ( NetConnection connection,
NetBitBuffer buffer 
)

Called when notify data is received.

Parameters
connectionThe connection from which the data was received.
bufferThe buffer containing the data.

◆ OnNotifyDelivered()

void OnNotifyDelivered ( NetConnection connection,
ref NetSendEnvelope  envelope 
)

Called when notify data is delivered.

Parameters
connectionThe connection to which the data was delivered.
envelopeThe envelope containing the delivered data.

◆ OnNotifyDispose()

void OnNotifyDispose ( ref NetSendEnvelope  envelope)

Called when a notify envelope is disposed.

Parameters
envelopeThe envelope that was disposed.

◆ OnNotifyLost()

void OnNotifyLost ( NetConnection connection,
ref NetSendEnvelope  envelope 
)

Called when notify data is lost.

Parameters
connectionThe connection from which the data was lost.
envelopeThe envelope containing the lost data.

◆ OnReliableData()

void OnReliableData ( NetConnection connection,
ReliableId  id,
byte *  data 
)

Called when reliable data is received.

Parameters
connectionThe connection from which the data was received.
idThe identifier of the reliable data.
dataThe data received.

◆ OnUnconnectedData()

void OnUnconnectedData ( NetBitBuffer buffer)

Called when unconnected data is received.

Parameters
bufferThe buffer containing the data.

◆ OnUnreliableData()

void OnUnreliableData ( NetConnection connection,
NetBitBuffer buffer 
)

Called when unreliable data is received.

Parameters
connectionThe connection from which the data was received.
bufferThe buffer containing the data.