Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_NetObject_Server

Network replication object, server version.
Contained in: global
Derived from: none
Derived by: none
Group: Network (NetObjects)

#include <ClanLib/network.h>

### public function member index:
### Construction:
`` | `CL_NetObject_Server` | `(`CL_NetObject_Controller`* `controller`)`;
`` | `CL_NetObject_Server` | `(`const` `CL_NetObject_Server`& `copy`)`;
``virtual`` | `~CL_NetObject_Server` | `()`;
### Attributes:
``int`` | `get_obj_id` | `() `const``;
### Operations:
``void`` | `send` | `(`CL_NetGroup`& `group`, `int` `msg_type`, `const` `CL_NetPacket`& `message`)`;
``void`` | `send` | `(`CL_NetComputer`& `computer`, `int` `msg_type`, `const` `CL_NetPacket`& `message`)`;
### Signals:
``CL_Signal_v2`<`const` `CL_NetComputer`& , `CL_NetPacket`& >&` | `sig_received_message` | `(`int` `msg_type`)`;

## Description:

The netobject is a message dispatcher for objects being replicated over the network.
It provides an easy system for a server object to send messages to replicated clients on remote computers, as well as getting answers back.

## Function Member Descriptions:

CL_NetObject_Server::CL_NetObject_Server - Construct a new netobject, assigning it an unique handle that identifies it over the
network.
`` `CL_NetObject_Server``(`CL_NetObject_Controller`* `controller`)`;

CL_NetObject_Server::CL_NetObject_Server - Copy constructor.
`` `CL_NetObject_Server``(`const` `CL_NetObject_Server`& `copy`)`;

CL_NetObject_Server::get_obj_id - Returns the netobject handle that identifies it over the network.
``int`` `get_obj_id``() `const``;

CL_NetObject_Server::send - Send a message to client objects.
``void`` `send``(`CL_NetGroup`& `group`, `int` `msg_type`, `const` `CL_NetPacket`& `message`)`;

CL_NetObject_Server::send - Send a message to client object.
``void`` `send``(`CL_NetComputer`& `computer`, `int` `msg_type`, `const` `CL_NetPacket`& `message`)`;

CL_NetObject_Server::sig_received_message - Signal emitted when receiving messages of the specified type from a client.
``CL_Signal_v2`<`const` `CL_NetComputer`& , `CL_NetPacket`& >&` `sig_received_message``(`int` `msg_type`)`;

CL_NetObject_Server::~CL_NetObject_Server - NetObject destructor.
``virtual`` `~CL_NetObject_Server``()`;

## Variable Member Descriptions: