clan::NetGameConnection Class Reference - ClanLib SDK
Description: clan::NetGameConnection Class Reference

Public Member Functions | List of all members
clan::NetGameConnection Class Reference
clanNetwork NetGame

NetGameConnection. More...

`#include <connection.h>`

## Public Member Functions
| NetGameConnection (NetGameConnectionSite *site, const SocketName &socket_name)
| NetGameConnection (NetGameConnectionSite *site, const TCPConnection &connection)
| Constructs a NetGameConnection.
| ~NetGameConnection ()
void | disconnect ()
| Disconnects a client.
void * | get_data (const std::string &name) const
| Get data.
SocketName | get_remote_name () const
| Get Remote name.
void | send_event (const NetGameEvent &game_event)
| Send event.
void | set_data (const std::string &name, void *data)
| Set data.

## Detailed Description

NetGameConnection.

## Constructor & Destructor Documentation

## ◆ NetGameConnection() [1/2]

clan::NetGameConnection::NetGameConnection | ( | NetGameConnectionSite * | site,
|  | const TCPConnection & | connection )

Constructs a NetGameConnection.

Parameters

  site | = Net Game Connection Site
  connection | = TCPConnection

## ◆ NetGameConnection() [2/2]

clan::NetGameConnection::NetGameConnection | ( | NetGameConnectionSite * | site,
|  | const SocketName & | socket_name )

## ◆ ~NetGameConnection()

clan::NetGameConnection::~NetGameConnection | ( |  | ) |

## Member Function Documentation

## ◆ disconnect()

void clan::NetGameConnection::disconnect | ( |  | ) |

Disconnects a client.

## ◆ get_data()

void * clan::NetGameConnection::get_data | ( | const std::string & | name | ) | const

Get data.

Parameters

  name | = String Ref

Returns
  void

## ◆ get_remote_name()

SocketName clan::NetGameConnection::get_remote_name | ( |  | ) | const

Get Remote name.

Returns
  remote_name

## ◆ send_event()

void clan::NetGameConnection::send_event | ( | const NetGameEvent & | game_event | ) |

Send event.

Parameters

  game_event | = Net Game Event

## ◆ set_data()

void clan::NetGameConnection::set_data | ( | const std::string & | name,
|  | void * | data )

Set data.

Parameters

  name | = String Ref
  data | = void

The documentation for this class was generated from the following file:

- connection.h