Main   GitHub

Methods | List of all members
NetConnection Class Reference

Inherits SimGroup, and SimGroup.

Inherited by GameConnection, and GameConnection.

Methods

void checkMaxRate ()
 
void checkMaxRate ()
 
void connect (remoteAddress)
 
void connect (remoteAddress)
 
string connectLocal ()
 
string connectLocal ()
 
string getAddress ()
 
string getAddress ()
 
int getGhostID (S32 realID)
 
int getGhostID (S32 realID)
 
int getGhostsActive ()
 
int getGhostsActive ()
 
int getPacketLoss ()
 
int getPacketLoss ()
 
int getPing ()
 
int getPing ()
 
int resolveGhostID (S32 ghostID)
 
int resolveGhostID (S32 ghostID)
 
int resolveObjectFromGhostIndex (S32 ghostIdx)
 
int resolveObjectFromGhostIndex (S32 ghostIdx)
 
void setSimulatedNetParams (packetLoss, delay)
 
void setSimulatedNetParams (packetLoss, delay)
 

Fields

SimBase
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
Namespace Linking
string superclass
 
string class
 
- Fields inherited from SimGroup
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 
- Fields inherited from SimSet
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 
- Fields inherited from SimObject
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

void NetConnection::checkMaxRate ( )

Use the checkMaxRate method to retrieve the current maximum packet rate for this connection. The period may not neccesarily be one second. To adjust packet rates, see the preference variables above

Returns
Returns an integer value representing the maximum number of packets that can be transmitted by this connection per transmission period.
void NetConnection::checkMaxRate ( )

Use the checkMaxRate method to retrieve the current maximum packet rate for this connection. The period may not neccesarily be one second. To adjust packet rates, see the preference variables above

Returns
Returns an integer value representing the maximum number of packets that can be transmitted by this connection per transmission period.
void NetConnection::connect ( remoteAddress  )

Use the connect method to request a connection to a remote server at the address remoteAddress.

Parameters
remoteAddressA string containing an address of the form: A.B.C.D:Port, where A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536.
Returns
No return value.
See Also
connectLocal, getAddress
void NetConnection::connect ( remoteAddress  )

Use the connect method to request a connection to a remote server at the address remoteAddress.

Parameters
remoteAddressA string containing an address of the form: A.B.C.D:Port, where A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536.
Returns
No return value.
See Also
connectLocal, getAddress
string NetConnection::connectLocal ( )

Use the connectLocal method to connect the current client-side connection to a local NetConnection, that is to create an internal connection from this client to the internal server. This is accomplished through the use of a back door mechanism and has an extremely high bandwidth.

Returns
No return value.
See Also
connect, getAddress
string NetConnection::connectLocal ( )

Use the connectLocal method to connect the current client-side connection to a local NetConnection, that is to create an internal connection from this client to the internal server. This is accomplished through the use of a back door mechanism and has an extremely high bandwidth.

Returns
No return value.
See Also
connect, getAddress
string NetConnection::getAddress ( )

Use the getAddress method to get the address and port that this NetConnection is currently attached to.

Returns
Returns the address and port that this NetConnection is currently attached to, where the addres will be of the form: A.B.C.D:Port. A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536. If the connection is local, the string 'local' will be returned. If a this NetConnection is not currently connected the method will return a NULL string.
See Also
connect, connectLocal
string NetConnection::getAddress ( )

Use the getAddress method to get the address and port that this NetConnection is currently attached to.

Returns
Returns the address and port that this NetConnection is currently attached to, where the addres will be of the form: A.B.C.D:Port. A .. B are standard IP numbers between 0 and 255 and Port can be between 1000 and 65536. If the connection is local, the string 'local' will be returned. If a this NetConnection is not currently connected the method will return a NULL string.
See Also
connect, connectLocal
int NetConnection::getGhostID ( S32  realID)

Convert a real id to the ghost id for this connection.

Returns
The ID as an integer
int NetConnection::getGhostID ( S32  realID)

Convert a real id to the ghost id for this connection.

Returns
The ID as an integer
int NetConnection::getGhostsActive ( )

Use the getGhostsActive method to determine how many ghosts are active on a particular connection.

Returns
Returns an integer value between 0 and inf, specifying how many objects are being ghosted to a client on the other side of a specific connection
int NetConnection::getGhostsActive ( )

Use the getGhostsActive method to determine how many ghosts are active on a particular connection.

Returns
Returns an integer value between 0 and inf, specifying how many objects are being ghosted to a client on the other side of a specific connection
int NetConnection::getPacketLoss ( )

Use the getPacketLoss method to determine the current packetLoss count for this connection.

Returns
Returns an integer value between 0 and inf, indicating the number of packets that have been lost to date on this net connection.
See Also
getPing
int NetConnection::getPacketLoss ( )

Use the getPacketLoss method to determine the current packetLoss count for this connection.

Returns
Returns an integer value between 0 and inf, indicating the number of packets that have been lost to date on this net connection.
See Also
getPing
int NetConnection::getPing ( )

Use the getPing method to determine the round-trip travel time from this connection to the agent on the other end and back again.

Returns
Returns an integer value representing the total time in milliseconds it takes for a ping request to travel to the agent on the other end of a connection and back to this agent.
See Also
getPacketLoss
int NetConnection::getPing ( )

Use the getPing method to determine the round-trip travel time from this connection to the agent on the other end and back again.

Returns
Returns an integer value representing the total time in milliseconds it takes for a ping request to travel to the agent on the other end of a connection and back to this agent.
See Also
getPacketLoss
int NetConnection::resolveGhostID ( S32  ghostID)

Convert a ghost id from this connection to a real id.

Returns
The ID as an integer
int NetConnection::resolveGhostID ( S32  ghostID)

Convert a ghost id from this connection to a real id.

Returns
The ID as an integer
int NetConnection::resolveObjectFromGhostIndex ( S32  ghostIdx)

Convert a ghost index from this connection to a real id.

Returns
The ID as an integer
int NetConnection::resolveObjectFromGhostIndex ( S32  ghostIdx)

Convert a ghost index from this connection to a real id.

Returns
The ID as an integer
void NetConnection::setSimulatedNetParams ( packetLoss  ,
delay   
)

Use the setSimulatedNetParams method to force a connection to experience a certain degree of packet-loss and/or latency. This is a debug feature to allow us to see how a distributed game will behave in the face of poor connection quality.

Parameters
packetLossA floating-point value between 0.0 (0%) and 1.0 (100%) dictating the percentage of packets to be artificially lost.
delayAn integer value specifying the number of milliseconds to insert into transmission latencies.
Returns
No return value.
See Also
getPacketLoss, getPing
void NetConnection::setSimulatedNetParams ( packetLoss  ,
delay   
)

Use the setSimulatedNetParams method to force a connection to experience a certain degree of packet-loss and/or latency. This is a debug feature to allow us to see how a distributed game will behave in the face of poor connection quality.

Parameters
packetLossA floating-point value between 0.0 (0%) and 1.0 (100%) dictating the percentage of packets to be artificially lost.
delayAn integer value specifying the number of milliseconds to insert into transmission latencies.
Returns
No return value.
See Also
getPacketLoss, getPing

Member Data Documentation

bool NetConnection::canSaveDynamicFields
string NetConnection::class

Script SuperClass of object.

string NetConnection::internalName
SimObjectPtr NetConnection::parentGroup

Group hierarchy parent of the object.

string NetConnection::superclass

Script Class of object.



Copyright © 2013 GarageGames, LLC. All Rights Reserved.