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

# Class CL_NetMessage

CL_NetMessage is used to contain messages sent across the network.
Contained in: global
Derived from: none
Derived by: none
Group: Network (NetSessions)

#include <ClanLib/network.h>

### public function member index:
### Construction:
`` | `CL_NetMessage` | `()`;
`` | `CL_NetMessage` | `(`const` `CL_NetMessage`& `copy`)`;
`` | `CL_NetMessage` | `(`const` `void`* `data`, `int` `size`)`;
`` | `CL_NetMessage` | `(`const` `std::string`& `data`)`;

## Description:

## Function Member Descriptions:

CL_NetMessage::CL_NetMessage - Creates a net message with no contents. (default constructor)
`` `CL_NetMessage``()`;

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

CL_NetMessage::CL_NetMessage - Constructs a Net message using the data given. Please notice that it doesn't duplicate the data, but only points its data pointer to the data given.
`` `CL_NetMessage``(`const` `void`* `data`, `int` `size`)`;

> data - Pointer to the data to be contained by the message.
> size - Size of the data.

CL_NetMessage::CL_NetMessage - NetMessage Constructor
`` `CL_NetMessage``(`const` `std::string`& `data`)`;

## Variable Member Descriptions:

CL_NetMessage::data - Packet data.
``std::string`` ``data`;`

CL_NetMessage::from - <p>Computer the message was sent from. You don't have to fill in this if you just want to send a message - it is only used when receiving from a netchannel.</p>
``CL_NetComputer`` ``from`;`