_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
CMetaClient Class Reference

#include <master.h>

Public Member Functions

 CMetaClient ()
 
int GetLastRecvState ()
 
int GetLogSize ()
 
CClientLogGetLastMessage ()
 
master.cpp - The master server.
 ~CMetaClient ()
 
void SetMetaServer (const std::string host, const int port)
 
int Init ()
 
void Close ()
 
int Send (const std::string cmd)
 
int Recv ()
 

Constructor & Destructor Documentation

CMetaClient::CMetaClient ( )
inline
CMetaClient::~CMetaClient ( )

Member Function Documentation

void CMetaClient::Close ( )

Close Connection to Master Server

Returns
nothing
CClientLog* CMetaClient::GetLastMessage ( )
inline
int CMetaClient::GetLastRecvState ( )
inline
int CMetaClient::GetLogSize ( )
inline
int CMetaClient::Init ( )

Initialize the TCP connection to the Meta Server and send test ping to it.

Returns
-1 fail, 0 success.
int CMetaClient::Recv ( )

Receive reply from Meta Server

Returns
error or number of bytes
int CMetaClient::Send ( const std::string  cmd)

Send a command to the meta server

Parameters
cmdcommand to send
Returns
-1 if failed, otherwise length of command
void CMetaClient::SetMetaServer ( const std::string  host,
const int  port 
)

Set the metaserver to use for internet play.

Parameters
hostHost to connect
portPort to use to connect

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.