BallisticNG
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Static Public Member Functions | Public Attributes
NgNetworking.Packets.NgNetworkConnection Struct Reference

Represents a network connection. More...

List of all members.

Public Member Functions

 NgNetworkConnection (int id, bool isPeer=true)
 Creates a new network connection using a Unity networking ID.
 NgNetworkConnection (CSteamID steamId, bool isPeer=true)
 Creates a new network connection using a Steam ID.
void WriteInPacket (NgPacketBuilder builder)
 Writes this network connections id into a packet.
NgPacketValue ToPacketValue ()
 Returns this network connection as a packet value.
override bool Equals (object obj)
override int GetHashCode ()
override string ToString ()

Static Public Member Functions

static NgNetworkConnection GenerateBotConnection (int index)
 Generates a new bot connection.
static NgNetworkConnection ReadFromPacket (NgPacket packet)
 Reads a network connection from a packet.
static implicit operator int (NgNetworkConnection input)
 Returns this connection as the Unity networking ID.
static implicit operator CSteamID (NgNetworkConnection input)
 Returns this connection as the Steam Id.
static implicit operator NgNetworkConnection (int input)
 Creates a new network connection from an integer.
static implicit operator NgNetworkConnection (CSteamID input)
 Creates a new network connection from a steam ID.
static bool operator== (NgNetworkConnection conn1, NgNetworkConnection conn2)
static bool operator!= (NgNetworkConnection conn1, NgNetworkConnection conn2)

Public Attributes

CSteamID SteamId
 The Id of the Steam User if the server is running Steam.
int Id
 The id of the connection.
bool IsPeer
 Whether this connection is an actual peer.

Detailed Description

Represents a network connection.


Constructor & Destructor Documentation

NgNetworking.Packets.NgNetworkConnection.NgNetworkConnection ( int  id,
bool  isPeer = true 
) [inline]

Creates a new network connection using a Unity networking ID.

Parameters:
idThe ID to asssign to this connection.
isPeerWhether this is an actual peer (true by default).
NgNetworking.Packets.NgNetworkConnection.NgNetworkConnection ( CSteamID  steamId,
bool  isPeer = true 
) [inline]

Creates a new network connection using a Steam ID.

Parameters:
steamIdThe steam ID to assign to this connection.
isPeerWhether this is an actual peer (true by default).

Member Function Documentation

Generates a new bot connection.

static implicit NgNetworking.Packets.NgNetworkConnection.operator CSteamID ( NgNetworkConnection  input) [inline, static]

Returns this connection as the Steam Id.

static implicit NgNetworking.Packets.NgNetworkConnection.operator int ( NgNetworkConnection  input) [inline, static]

Returns this connection as the Unity networking ID.

static implicit NgNetworking.Packets.NgNetworkConnection.operator NgNetworkConnection ( int  input) [inline, static]

Creates a new network connection from an integer.

static implicit NgNetworking.Packets.NgNetworkConnection.operator NgNetworkConnection ( CSteamID  input) [inline, static]

Creates a new network connection from a steam ID.

Reads a network connection from a packet.

Parameters:
packetThe packet to read from.

Returns this network connection as a packet value.

Returns:

Writes this network connections id into a packet.

Parameters:
builderThe packet builder to write the information into.

Member Data Documentation

The id of the connection.

Whether this connection is an actual peer.

The Id of the Steam User if the server is running Steam.


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