OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
C4Network2.h File Reference
Include dependency graph for C4Network2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  C4Network2Status
 
class  C4Network2
 
class  C4Network2::InitialConnect
 
class  C4VoteDialog
 
class  C4PacketJoinData
 
class  C4PacketActivateReq
 

Enumerations

enum  C4NetGameState {
  GS_None, GS_Init, GS_Lobby, GS_Pause,
  GS_Go
}
 

Variables

const int16_t C4NetStdPortTCP = 11112
 
const int16_t C4NetStdPortUDP = 11113
 
const int16_t C4NetStdPortDiscovery = 11114
 
const int16_t C4NetStdPortRefServer = 11111
 
const int16_t C4NetStdPortPuncher = 11115
 
const int16_t C4NetStdPortHTTP = 80
 
const int C4NetResRetrieveTimeout = 100000
 
const int C4NetActivationReqInterval = 5000
 
const int C4NetMaxBehind4Activation = 20
 
const int C4NetDeactivationDelay = 500
 
const unsigned int C4NetChaseTargetUpdateInterval = 5
 
const unsigned int C4NetReferenceUpdateInterval = 120
 
const unsigned int C4NetMinLeagueUpdateInterval = 1
 
const unsigned int C4NetVotingTimeout = 10
 
const unsigned int C4NetMinVotingInterval = 120
 
const size_t C4NetStreamingMinBlockSize = 10 * 1024
 
const size_t C4NetStreamingMaxBlockSize = 20 * 1024
 
const int C4NetStreamingInterval = 30
 
C4Network2 Network
 

Enumeration Type Documentation

Enumerator
GS_None 
GS_Init 
GS_Lobby 
GS_Pause 
GS_Go 

Definition at line 60 of file C4Network2.h.

61 {
62  GS_None, // network not active
63  GS_Init, // connecting to host, waiting for join data
64  GS_Lobby, // lobby mode
65  GS_Pause, // game paused
66  GS_Go // game running
67 };

Variable Documentation

const int C4NetActivationReqInterval = 5000

Definition at line 40 of file C4Network2.h.

Referenced by C4Network2::RequestActivate().

const unsigned int C4NetChaseTargetUpdateInterval = 5

Definition at line 45 of file C4Network2.h.

Referenced by C4Network2::UpdateChaseTarget().

const int C4NetDeactivationDelay = 500

Definition at line 42 of file C4Network2.h.

Referenced by C4Network2::DeactivateInactiveClients().

const int C4NetMaxBehind4Activation = 20

Definition at line 41 of file C4Network2.h.

Referenced by C4Network2::HandleActivateReq().

const unsigned int C4NetMinLeagueUpdateInterval = 1

Definition at line 49 of file C4Network2.h.

Referenced by C4Network2::InvalidateReference().

const unsigned int C4NetMinVotingInterval = 120

Definition at line 53 of file C4Network2.h.

Referenced by C4Network2::Vote().

const unsigned int C4NetReferenceUpdateInterval = 120

Definition at line 48 of file C4Network2.h.

Referenced by C4Network2::Execute().

const int C4NetResRetrieveTimeout = 100000
const int16_t C4NetStdPortDiscovery = 11114
const int16_t C4NetStdPortHTTP = 80

Definition at line 34 of file C4Network2.h.

Referenced by C4Network2UpdateClient::GetDefaultPort().

const int16_t C4NetStdPortPuncher = 11115

Definition at line 33 of file C4Network2.h.

Referenced by C4Network2::InitPuncher(), and main().

const int16_t C4NetStdPortTCP = 11112
const int16_t C4NetStdPortUDP = 11113
const int C4NetStreamingInterval = 30

Definition at line 58 of file C4Network2.h.

Referenced by C4Network2::StreamOut().

const size_t C4NetStreamingMaxBlockSize = 20 * 1024

Definition at line 57 of file C4Network2.h.

Referenced by C4Network2::StartStreaming().

const size_t C4NetStreamingMinBlockSize = 10 * 1024

Definition at line 56 of file C4Network2.h.

Referenced by C4Network2::StreamOut().

const unsigned int C4NetVotingTimeout = 10

Definition at line 52 of file C4Network2.h.

Referenced by C4Network2::Execute().

C4Network2 Network

Definition at line 53 of file C4Globals.cpp.

Referenced by C4Game::Abort(), C4GameLobby::Countdown::Abort(), C4MainMenu::ActivateHost(), C4MainMenu::ActivateMain(), C4PlayerInfoList::AddInfo(), C4ChartDialog::C4ChartDialog(), C4GameOptionButtons::C4GameOptionButtons(), C4GameOverDlg::C4GameOverDlg(), C4Network2Stats::C4Network2Stats(), C4GameControlNetwork::CalcPerformance(), C4Network2IO::CallHandlers(), C4Game::CanQuickSave(), C4GameControlNetwork::CheckCompleteCtrl(), C4Game::Clear(), C4GameLobby::Countdown::Countdown(), C4GameControlNetwork::DecideControlDelivery(), C4Network2Client::DoConnectAttempt(), C4GameControlNetwork::DoInput(), C4PlayerInfoList::DoPlayerInfoUpdate(), C4Viewport::Draw(), C4Game::Evaluate(), C4GameControlNetwork::ExecSyncControl(), C4Viewport::Execute(), C4GraphicsSystem::Execute(), C4Game::Execute(), C4Network2IO::Execute(), C4Network2Stats::ExecuteSecond(), C4PlayerList::FileInUse(), C4GameControlNetwork::HandleControlPkt(), C4Network2Players::HandlePacket(), C4Network2Players::HandlePlayerInfo(), C4Network2Players::HandlePlayerInfoUpdRequest(), C4Network2IO::HandlePuncherPacket(), C4Console::In(), C4Network2Players::Init(), C4Game::Init(), C4Game::InitControl(), C4Game::InitGame(), C4Game::InitGameFinal(), C4Game::InitKeyboard(), C4Network2Reference::InitLocal(), C4PlayerInfoList::InitLocal(), C4Game::InitNetworkFromReference(), C4Game::InitNetworkHost(), C4Game::InitPlayers(), C4Game::IsPaused(), C4TeamList::IsTeamVisible(), C4Network2Players::JoinLocalPlayer(), C4PlayerList::JoinNew(), C4PlayerInfo::LoadFromLocalFile(), C4PlayerInfo::LoadResource(), C4GameLobby::LobbyError(), C4PlayerInfoList::LocalJoinUnjoinedPlayersInQueue(), Log(), C4MainMenu::MenuCommand(), C4GameOptionButtons::OnBtnInternet(), C4GameOptionButtons::OnBtnPassword(), C4GameLobby::MainDlg::OnClientAddPlayer(), C4Network2Players::OnClientPart(), C4StartupScenSelDlg::OnClosed(), C4GameOptionButtons::OnCommentSet(), C4Network2IO::OnConn(), C4GameLobby::MainDlg::OnMessage(), C4GameOptionButtons::OnPasswordSet(), C4GameLobby::MainDlg::OnRunBtn(), C4GameSaveSavegame::OnSaving(), C4GameLobby::Countdown::OnSec1Timer(), C4AbortGameDialog::OnShown(), C4Network2Players::OnStatusGoReached(), C4Network2IO::OnThreadEvent(), C4Game::OpenScenario(), C4GameControlNetwork::PackCompleteCtrl(), C4Application::ParseCommandLine(), C4Game::Pause(), C4ControlJoinPlayer::PreExecute(), C4ControlJoinPlayer::PreRec(), C4MessageInput::ProcessCommand(), C4TeamList::RecheckPlayerInfoTeams(), C4PlayerInfoList::RecreatePlayers(), C4Game::ReloadDef(), C4Game::ReloadFile(), C4Game::ReloadParticle(), C4Network2Players::RequestPlayerInfoUpdate(), C4PlayerInfoList::RestoreSavegameInfos(), C4GameResList::RetrieveFiles(), C4Player::Save(), C4Console::SaveGame(), C4PlayerInfoList::SetAsRestoreInfos(), C4GameControlNetwork::SetCtrlMode(), C4TeamList::SetTeamColors(), C4TeamList::SetTeamDistribution(), C4GameLobby::MainDlg::Start(), C4Game::Synchronize(), C4Game::Unpause(), C4Network2ResDlg::Update(), C4Console::UpdateNetMenu(), C4GameOptionButtons::UpdatePasswordBtn(), C4Console::UpdatePlayerMenu(), C4Network2ClientDlg::UpdateText(), C4GameSaveSavegame::WriteDesc(), C4GameSaveRecord::WriteDesc(), C4GameSave::WriteDescDate(), C4GameSave::WriteDescNetworkClients(), and C4Network2Stats::~C4Network2Stats().