Open 3D Engine GridMate API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Public Member Functions | List of all members
GridMate::Handshake Class Referenceabstract

#include <Handshake.h>

Inherited by GridMate::DefaultHandshake.

Public Member Functions

virtual void OnInitiate (ConnectionID id, WriteBuffer &wb)=0
 Called from the system to write initial handshake data.
 
virtual HandshakeErrorCode OnReceiveRequest (ConnectionID id, ReadBuffer &rb, WriteBuffer &wb)=0
 
virtual bool OnConfirmRequest (ConnectionID id, ReadBuffer &rb)=0
 
virtual bool OnReceiveAck (ConnectionID id, ReadBuffer &rb)=0
 
virtual bool OnConfirmAck (ConnectionID id, ReadBuffer &rb)=0
 
virtual bool OnNewConnection (const AZStd::string &address)=0
 Return true if you want to reject early reject a connection.
 
virtual void OnDisconnect (ConnectionID id)=0
 Called when we close a connection.
 
virtual unsigned int GetHandshakeTimeOutMS () const =0
 Return timeout in milliseconds of the handshake procedure.
 

Detailed Description

Handshake interface

Member Function Documentation

◆ OnConfirmAck()

virtual bool GridMate::Handshake::OnConfirmAck ( ConnectionID  id,
ReadBuffer rb 
)
pure virtual

Called when we receive Ack from the other system while we were connected. This callback is called so we can just confirm that our connection is valid!

Implemented in GridMate::DefaultHandshake.

◆ OnConfirmRequest()

virtual bool GridMate::Handshake::OnConfirmRequest ( ConnectionID  id,
ReadBuffer rb 
)
pure virtual

If we already have a valid connection and we receive another connection request, the system will call this function to verify the state of the connection.

Implemented in GridMate::DefaultHandshake.

◆ OnReceiveAck()

virtual bool GridMate::Handshake::OnReceiveAck ( ConnectionID  id,
ReadBuffer rb 
)
pure virtual

Called when we receive Ack from the other system on our initial data OnInitiate. return true to accept the ack or false to reject the handshake.

Implemented in GridMate::DefaultHandshake.

◆ OnReceiveRequest()

virtual HandshakeErrorCode GridMate::Handshake::OnReceiveRequest ( ConnectionID  id,
ReadBuffer rb,
WriteBuffer wb 
)
pure virtual

Called when a system receives a handshake initiation from another system. You can write a reply in the WriteBuffer. return true if you accept this connection and false if you reject it.

Implemented in GridMate::DefaultHandshake.


The documentation for this class was generated from the following file: