ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index

Class CL_NetComputer

Class representing a computer in a network game.
Contained in: global
Derived from: none
Derived by: none
Group: Network (NetSessions)

#include <ClanLib/network.h>


public function member index:

Construction:

CL_NetComputer();
CL_NetComputer(const CL_NetComputer& copy);
virtual ~CL_NetComputer();

Attributes:

CL_IPAddress get_address() const;
CL_NetSession get_session();
bool is_disconnected() const;
const std::string& get_disconnect_reason() const;
bool operator == (const CL_NetComputer& other_instance) const;
bool operator < (const CL_NetComputer& other_instance) const;
bool operator > (const CL_NetComputer& other_instance) const;

Operations:

void disconnect();
void send(const std::string& packet_channel, const CL_NetPacket& packet);
CL_NetComputer& operator = (const CL_NetComputer& other_instance);

Implementation:

CL_NetComputer(class CL_NetComputer_Generic* impl);
 

Description:


Function Member Descriptions:

CL_NetComputer::CL_NetComputer - Creates a netcomputer object.
CL_NetComputer();


CL_NetComputer::disconnect - Disconnects the computer from server.
void disconnect();


CL_NetComputer::get_address - Returns the IP address (in network byte order) of the computer.
CL_IPAddress get_address() const;


CL_NetComputer::get_disconnect_reason - Returns the disconenct reason.
const std::string& get_disconnect_reason() const;


CL_NetComputer::get_session - Returns the netsession that the computer is attached to.
CL_NetSession get_session();


CL_NetComputer::is_disconnected - Returns true if computer is disconnected.
bool is_disconnected() const;


CL_NetComputer::operator < - Returns true if the other netcomputer is less.
bool operator < (const CL_NetComputer& other_instance) const;
<p>This is used for sorting purposes (eg. if you use a std::map<CL_NetComputer, Player>).</p>



CL_NetComputer::operator = - Copy Operator.
CL_NetComputer& operator = (const CL_NetComputer& other_instance);


CL_NetComputer::operator == - Returns true if objects are the same.
bool operator == (const CL_NetComputer& other_instance) const;


CL_NetComputer::operator > - Returns true if the other netcomputer is greater.
bool operator > (const CL_NetComputer& other_instance) const;
<p>This is used for sorting purposes (eg. if you use a std::map<CL_NetComputer, Player>).</p>



CL_NetComputer::send - Send packet to the specified channel.
void send(const std::string& packet_channel, const CL_NetPacket& packet);


CL_NetComputer::~CL_NetComputer - Net Computer Destructor.
virtual ~CL_NetComputer();



Variable Member Descriptions: