Represents a network connection. More...
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. |
Represents a network connection.
NgNetworking.Packets.NgNetworkConnection.NgNetworkConnection | ( | int | id, |
bool | isPeer = true |
||
) | [inline] |
Creates a new network connection using a Unity networking ID.
id | The ID to asssign to this connection. |
isPeer | Whether 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.
steamId | The steam ID to assign to this connection. |
isPeer | Whether this is an actual peer (true by default). |
static NgNetworkConnection NgNetworking.Packets.NgNetworkConnection.GenerateBotConnection | ( | int | index | ) | [inline, static] |
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.
static NgNetworkConnection NgNetworking.Packets.NgNetworkConnection.ReadFromPacket | ( | NgPacket | packet | ) | [inline, static] |
Reads a network connection from a packet.
packet | The packet to read from. |
Returns this network connection as a packet value.
void NgNetworking.Packets.NgNetworkConnection.WriteInPacket | ( | NgPacketBuilder | builder | ) | [inline] |
Writes this network connections id into a packet.
builder | The packet builder to write the information into. |
The id of the connection.
Whether this connection is an actual peer.