Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Version 2 (modified by scheusso, 16 years ago) (diff)

Host

Overview

The basic task of these classes is the interface between Orxonox and the network engine. This includes creating and opening a server, connecting to a server as client and provide common functions (for Server and Client) like sendChat.

The Host class is the parent class of Server and Client. It ensures that only one instance of either Server or Client is running (so called Singleton) and provides static functions that both (Server and Client) have to implement.

Host class and common functions

Below is a list of functions that you might want to use:

Function Name Description
running() Tells you whether an instance of Server or Client exists (no Information, wheter connected or not)
isServer() Tells you whether the instance is a Server or not
sendChat(unsigned char *message) Sends a message to the server or the clients

Server class

Client class

Usage Examples