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::DefaultHandshake Class Reference

#include <DefaultHandshake.h>

Inherits GridMate::Handshake.

Public Member Functions

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

Detailed Description

Default handshake interface.

Member Function Documentation

◆ OnConfirmAck()

bool GridMate::DefaultHandshake::OnConfirmAck ( ConnectionID  id,
ReadBuffer rb 
)
overridevirtual

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!

Implements GridMate::Handshake.

◆ OnConfirmRequest()

bool GridMate::DefaultHandshake::OnConfirmRequest ( ConnectionID  id,
ReadBuffer rb 
)
overridevirtual

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.

Implements GridMate::Handshake.

◆ OnReceiveAck()

bool GridMate::DefaultHandshake::OnReceiveAck ( ConnectionID  id,
ReadBuffer rb 
)
overridevirtual

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.

Implements GridMate::Handshake.

◆ OnReceiveRequest()

HandshakeErrorCode GridMate::DefaultHandshake::OnReceiveRequest ( ConnectionID  id,
ReadBuffer rb,
WriteBuffer wb 
)
overridevirtual

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.

Implements GridMate::Handshake.


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