GekkoNet 1.0
C/C++ Peer to Peer Game Networking SDK
Loading...
Searching...
No Matches
gekkonet.h File Reference
#include <stdbool.h>
Include dependency graph for gekkonet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GekkoConfig
struct  GekkoNetAddress
struct  GekkoNetResult
struct  GekkoNetAdapter
struct  GekkoGameEvent
union  GekkoGameEvent::GekkoEventData
struct  GekkoGameEvent::GekkoEventData::GekkoAdvance
struct  GekkoGameEvent::GekkoEventData::GekkoSave
struct  GekkoGameEvent::GekkoEventData::GekkoLoad
struct  GekkoSessionEvent
union  GekkoSessionEvent::GekkoSessionData
struct  GekkoSessionEvent::GekkoSessionData::GekkoSyncing
struct  GekkoSessionEvent::GekkoSessionData::GekkoConnected
struct  GekkoSessionEvent::GekkoSessionData::GekkoDisconnected
struct  GekkoSessionEvent::GekkoSessionData::GekkoDesynced
struct  GekkoSessionEvent::GekkoSessionData::GekkoReplayDesynced
struct  GekkoNetworkStats
struct  GekkoRollbackStats

Macros

#define GEKKONET_API

Typedefs

typedef struct GekkoSession GekkoSession
typedef enum GekkoSessionType GekkoSessionType
typedef struct GekkoConfig GekkoConfig
typedef enum GekkoPlayerType GekkoPlayerType
typedef struct GekkoNetAddress GekkoNetAddress
typedef struct GekkoNetResult GekkoNetResult
typedef struct GekkoNetAdapter GekkoNetAdapter
typedef enum GekkoGameEventType GekkoGameEventType
typedef struct GekkoGameEvent GekkoGameEvent
typedef enum GekkoSessionEventType GekkoSessionEventType
typedef struct GekkoSessionEvent GekkoSessionEvent
typedef struct GekkoNetworkStats GekkoNetworkStats
typedef struct GekkoRollbackStats GekkoRollbackStats

Enumerations

enum  GekkoSessionType { GekkoGameSession , GekkoStressSession , GekkoSpectateSession , GekkoReplaySession }
enum  GekkoPlayerType { GekkoLocalPlayer , GekkoRemotePlayer , GekkoSpectator }
enum  GekkoGameEventType { GekkoEmptyGameEvent = -1 , GekkoAdvanceEvent , GekkoSaveEvent , GekkoLoadEvent }
enum  GekkoSessionEventType {
  GekkoEmptySessionEvent = -1 , GekkoPlayerSyncing , GekkoPlayerConnected , GekkoPlayerDisconnected ,
  GekkoSessionStarted , GekkoSpectatorPaused , GekkoSpectatorUnpaused , GekkoDesyncDetected ,
  GekkoReplayFinished , GekkoReplayDesync
}

Functions

GEKKONET_API bool gekko_create (GekkoSession **session, GekkoSessionType session_type)
GEKKONET_API bool gekko_destroy (GekkoSession **session)
GEKKONET_API void gekko_start (GekkoSession *session, GekkoConfig *config)
GEKKONET_API void gekko_net_adapter_set (GekkoSession *session, GekkoNetAdapter *adapter)
GEKKONET_API int gekko_add_actor (GekkoSession *session, GekkoPlayerType player_type, GekkoNetAddress *addr)
GEKKONET_API bool gekko_disconnect_actor (GekkoSession *session, int actor)
GEKKONET_API void gekko_set_disconnect_timeout (GekkoSession *session, unsigned int timeout)
GEKKONET_API void gekko_set_local_delay (GekkoSession *session, int player, unsigned char delay)
GEKKONET_API void gekko_set_runahead (GekkoSession *session, unsigned char runahead)
GEKKONET_API void gekko_set_input_prediction_window (GekkoSession *session, unsigned char window)
GEKKONET_API void gekko_add_local_input (GekkoSession *session, int player, void *input)
GEKKONET_API GekkoGameEvent ** gekko_update_session (GekkoSession *session, int *count)
GEKKONET_API GekkoSessionEvent ** gekko_session_events (GekkoSession *session, int *count)
GEKKONET_API float gekko_frames_ahead (GekkoSession *session)
GEKKONET_API int gekko_spectator_buffered_frames (GekkoSession *session)
GEKKONET_API void gekko_network_stats (GekkoSession *session, int player, GekkoNetworkStats *stats)
GEKKONET_API void gekko_rollback_stats (GekkoSession *session, GekkoRollbackStats *stats)
GEKKONET_API void gekko_network_poll (GekkoSession *session)
GEKKONET_API bool gekko_start_recording (GekkoSession *session, bool save_initial_state, bool disable_compression)
GEKKONET_API const unsigned char * gekko_stop_recording (GekkoSession *session, unsigned int *length)
GEKKONET_API const unsigned char * gekko_peek_recording (GekkoSession *session, unsigned int *length)
GEKKONET_API bool gekko_record_checksums (GekkoSession *session, unsigned int interval)
GEKKONET_API bool gekko_set_replay_user_data (GekkoSession *session, const void *data, unsigned int length)
GEKKONET_API bool gekko_load_replay (GekkoSession *session, const unsigned char *replay_data, unsigned int length)
GEKKONET_API const unsigned char * gekko_replay_user_data (GekkoSession *session, unsigned int *length)
GEKKONET_API GekkoNetAdapter * gekko_default_adapter (unsigned short port)
GEKKONET_API bool gekko_default_adapter_destroy ()

Macro Definition Documentation

◆ GEKKONET_API

#define GEKKONET_API

Definition at line 50 of file gekkonet.h.

Typedef Documentation

◆ GekkoConfig

typedef struct GekkoConfig GekkoConfig

◆ GekkoGameEvent

typedef struct GekkoGameEvent GekkoGameEvent

◆ GekkoGameEventType

◆ GekkoNetAdapter

typedef struct GekkoNetAdapter GekkoNetAdapter

◆ GekkoNetAddress

typedef struct GekkoNetAddress GekkoNetAddress

◆ GekkoNetResult

typedef struct GekkoNetResult GekkoNetResult

◆ GekkoNetworkStats

typedef struct GekkoNetworkStats GekkoNetworkStats

◆ GekkoPlayerType

◆ GekkoRollbackStats

typedef struct GekkoRollbackStats GekkoRollbackStats

◆ GekkoSession

typedef struct GekkoSession GekkoSession

Definition at line 56 of file gekkonet.h.

◆ GekkoSessionEvent

typedef struct GekkoSessionEvent GekkoSessionEvent

◆ GekkoSessionEventType

◆ GekkoSessionType

Enumeration Type Documentation

◆ GekkoGameEventType

Enumerator
GekkoEmptyGameEvent 
GekkoAdvanceEvent 
GekkoSaveEvent 
GekkoLoadEvent 

Definition at line 105 of file gekkonet.h.

◆ GekkoPlayerType

Enumerator
GekkoLocalPlayer 
GekkoRemotePlayer 
GekkoSpectator 

Definition at line 77 of file gekkonet.h.

◆ GekkoSessionEventType

Enumerator
GekkoEmptySessionEvent 
GekkoPlayerSyncing 
GekkoPlayerConnected 
GekkoPlayerDisconnected 
GekkoSessionStarted 
GekkoSpectatorPaused 
GekkoSpectatorUnpaused 
GekkoDesyncDetected 
GekkoReplayFinished 
GekkoReplayDesync 

Definition at line 139 of file gekkonet.h.

◆ GekkoSessionType

Enumerator
GekkoGameSession 
GekkoStressSession 
GekkoSpectateSession 
GekkoReplaySession 

Definition at line 58 of file gekkonet.h.

Function Documentation

◆ gekko_add_actor()

GEKKONET_API int gekko_add_actor ( GekkoSession * session,
GekkoPlayerType player_type,
GekkoNetAddress * addr )

Definition at line 59 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_add_local_input()

GEKKONET_API void gekko_add_local_input ( GekkoSession * session,
int player,
void * input )

Definition at line 89 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_create()

GEKKONET_API bool gekko_create ( GekkoSession ** session,
GekkoSessionType session_type )

Definition at line 8 of file gekkonet.cpp.

◆ gekko_default_adapter()

GEKKONET_API GekkoNetAdapter * gekko_default_adapter ( unsigned short port)

Definition at line 288 of file gekkonet.cpp.

◆ gekko_default_adapter_destroy()

GEKKONET_API bool gekko_default_adapter_destroy ( )

Definition at line 322 of file gekkonet.cpp.

◆ gekko_destroy()

GEKKONET_API bool gekko_destroy ( GekkoSession ** session)

Definition at line 38 of file gekkonet.cpp.

◆ gekko_disconnect_actor()

GEKKONET_API bool gekko_disconnect_actor ( GekkoSession * session,
int actor )

Definition at line 64 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_frames_ahead()

GEKKONET_API float gekko_frames_ahead ( GekkoSession * session)

Definition at line 104 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_load_replay()

GEKKONET_API bool gekko_load_replay ( GekkoSession * session,
const unsigned char * replay_data,
unsigned int length )

Definition at line 170 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_net_adapter_set()

GEKKONET_API void gekko_net_adapter_set ( GekkoSession * session,
GekkoNetAdapter * adapter )

Definition at line 54 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_network_poll()

GEKKONET_API void gekko_network_poll ( GekkoSession * session)

Definition at line 124 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_network_stats()

GEKKONET_API void gekko_network_stats ( GekkoSession * session,
int player,
GekkoNetworkStats * stats )

Definition at line 114 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_peek_recording()

GEKKONET_API const unsigned char * gekko_peek_recording ( GekkoSession * session,
unsigned int * length )

Definition at line 147 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_record_checksums()

GEKKONET_API bool gekko_record_checksums ( GekkoSession * session,
unsigned int interval )

Definition at line 160 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_replay_user_data()

GEKKONET_API const unsigned char * gekko_replay_user_data ( GekkoSession * session,
unsigned int * length )

Definition at line 175 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_rollback_stats()

GEKKONET_API void gekko_rollback_stats ( GekkoSession * session,
GekkoRollbackStats * stats )

Definition at line 119 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_session_events()

GEKKONET_API GekkoSessionEvent ** gekko_session_events ( GekkoSession * session,
int * count )

Definition at line 99 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_set_disconnect_timeout()

GEKKONET_API void gekko_set_disconnect_timeout ( GekkoSession * session,
unsigned int timeout )

Definition at line 69 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_set_input_prediction_window()

GEKKONET_API void gekko_set_input_prediction_window ( GekkoSession * session,
unsigned char window )

Definition at line 84 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_set_local_delay()

GEKKONET_API void gekko_set_local_delay ( GekkoSession * session,
int player,
unsigned char delay )

Definition at line 74 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_set_replay_user_data()

GEKKONET_API bool gekko_set_replay_user_data ( GekkoSession * session,
const void * data,
unsigned int length )

Definition at line 165 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_set_runahead()

GEKKONET_API void gekko_set_runahead ( GekkoSession * session,
unsigned char runahead )

Definition at line 79 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_spectator_buffered_frames()

GEKKONET_API int gekko_spectator_buffered_frames ( GekkoSession * session)

Definition at line 109 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_start()

GEKKONET_API void gekko_start ( GekkoSession * session,
GekkoConfig * config )

Definition at line 49 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_start_recording()

GEKKONET_API bool gekko_start_recording ( GekkoSession * session,
bool save_initial_state,
bool disable_compression )

Definition at line 129 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_stop_recording()

GEKKONET_API const unsigned char * gekko_stop_recording ( GekkoSession * session,
unsigned int * length )

Definition at line 134 of file gekkonet.cpp.

Here is the call graph for this function:

◆ gekko_update_session()

GEKKONET_API GekkoGameEvent ** gekko_update_session ( GekkoSession * session,
int * count )

Definition at line 94 of file gekkonet.cpp.

Here is the call graph for this function: