#include <NAT.h>
Definition at line 66 of file NAT.h.
◆ NAT()
◆ ~NAT()
◆ allConnectionsDone()
| Bool NAT::allConnectionsDone |
( |
| ) |
|
|
protected |
◆ allConnectionsDoneThisRound()
| Bool NAT::allConnectionsDoneThisRound |
( |
| ) |
|
|
protected |
◆ attachSlotList()
◆ connectionComplete()
| void NAT::connectionComplete |
( |
Int | slotIndex | ) |
|
|
protected |
◆ connectionFailed()
| void NAT::connectionFailed |
( |
Int | slotIndex | ) |
|
|
protected |
◆ connectionUpdate()
the update function for the connections.
Definition at line 300 of file NAT.cpp.
◆ doThisConnectionRound()
| void NAT::doThisConnectionRound |
( |
| ) |
|
|
protected |
compute who will connect with who for this round.
Definition at line 657 of file NAT.cpp.
◆ establishConnectionPaths()
| void NAT::establishConnectionPaths |
( |
| ) |
|
◆ generatePortNumbers()
| void NAT::generatePortNumbers |
( |
GameSlot ** | slotList, |
|
|
Int | localSlot ) |
|
protected |
generate all of the slots' port numbers to be used.
Definition at line 638 of file NAT.cpp.
◆ getSlotPort()
| Int NAT::getSlotPort |
( |
Int | slot | ) |
|
◆ getTransport()
return the newly created Transport layer that has all the connections and whatnot.
Definition at line 650 of file NAT.cpp.
◆ gotInternalAddress()
◆ gotMangledPort()
◆ notifyTargetOfProbe()
| void NAT::notifyTargetOfProbe |
( |
GameSlot * | targetSlot | ) |
|
|
protected |
◆ notifyUsersOfConnectionDone()
| void NAT::notifyUsersOfConnectionDone |
( |
Int | nodeIndex | ) |
|
|
protected |
◆ notifyUsersOfConnectionFailed()
| void NAT::notifyUsersOfConnectionFailed |
( |
Int | nodeIndex | ) |
|
|
protected |
◆ probed()
| void NAT::probed |
( |
Int | nodeNumber | ) |
|
|
protected |
◆ processGlobalMessage()
| void NAT::processGlobalMessage |
( |
Int | slotNum, |
|
|
const char * | options ) |
◆ processManglerResponse()
◆ sendAProbe()
send a "PROBE" packet to this IP and port.
Definition at line 726 of file NAT.cpp.
◆ sendMangledPortNumberToTarget()
◆ sendMangledSourcePort()
| void NAT::sendMangledSourcePort |
( |
| ) |
|
|
protected |
starts the process to get the next mangled source port.
Definition at line 738 of file NAT.cpp.
◆ setConnectionState()
central point for changing a connection's state.
Definition at line 1286 of file NAT.cpp.
◆ update()
◆ m_beenProbed
have I been notified that I've been probed this round?
Definition at line 124 of file NAT.h.
◆ m_connectionNodes
info regarding the nodes that are being connected.
Definition at line 131 of file NAT.h.
◆ m_connectionPairIndex
| Int NAT::m_connectionPairIndex |
|
protected |
◆ m_connectionPairs
| Int NAT::m_connectionPairs |
|
staticprotected |
Definition at line 67 of file NAT.h.
◆ m_connectionRound
The "round" of connections we are currently on.
Definition at line 113 of file NAT.h.
◆ m_connectionStates
connection states for this round for all the nodes.
Definition at line 129 of file NAT.h.
◆ m_keepaliveInterval
| time_t NAT::m_keepaliveInterval = 15000 |
|
staticprotected |
◆ m_localIP
The IP of the local computer.
Definition at line 111 of file NAT.h.
◆ m_localNodeNumber
| Int NAT::m_localNodeNumber |
|
protected |
The node number of the local player.
Definition at line 109 of file NAT.h.
◆ m_manglerAddress
◆ m_manglerRetries
| Int NAT::m_manglerRetries |
|
protected |
◆ m_manglerRetryTime
| time_t NAT::m_manglerRetryTime |
|
protected |
◆ m_manglerRetryTimeInterval
| time_t NAT::m_manglerRetryTimeInterval = 300 |
|
staticprotected |
◆ m_maxAllowedManglerRetries
| Int NAT::m_maxAllowedManglerRetries = 25 |
|
staticprotected |
◆ m_maxNumRetriesAllowed
| Int NAT::m_maxNumRetriesAllowed |
|
protected |
◆ m_myConnections
| Bool NAT::m_myConnections[MAX_SLOTS] |
|
protected |
keeps track of all the nodes I've connected to. For keepalive.
Definition at line 135 of file NAT.h.
◆ m_NATState
◆ m_nextKeepaliveTime
| time_t NAT::m_nextKeepaliveTime |
|
protected |
the next time we will send out our keepalive packets.
Definition at line 136 of file NAT.h.
◆ m_nextPortSendTime
| time_t NAT::m_nextPortSendTime |
|
protected |
Last time we sent our mangled port number to our target this round.
Definition at line 146 of file NAT.h.
◆ m_numNodes
The number of players we have to connect together.
Definition at line 112 of file NAT.h.
◆ m_numRetries
◆ m_packetID
◆ m_previousSourcePort
◆ m_roundTimeout
the time at which we will time out this connection round.
Definition at line 149 of file NAT.h.
◆ m_slotList
◆ m_sourcePorts
the source ports that the other players communicate to us on.
Definition at line 133 of file NAT.h.
◆ m_spareSocketPort
◆ m_startingPortNumber
the starting port number for this game. The slots all get port numbers with their port numbers based on this number. this is done so that games that are played right after each other with the same players in the same slot order will not use the old source port allocation scheme in case their NAT hasn't timed out that connection.
Definition at line 141 of file NAT.h.
◆ m_targetNodeNumber
| Int NAT::m_targetNodeNumber |
|
protected |
The node number of the player we are connecting to this round.
Definition at line 110 of file NAT.h.
◆ m_timeBetweenRetries
| Int NAT::m_timeBetweenRetries = 500 |
|
staticprotected |
◆ m_timeForRoundTimeout
| time_t NAT::m_timeForRoundTimeout = 15000 |
|
staticprotected |
◆ m_timeoutTime
the time at which we will time out waiting for the other player's port number.
Definition at line 148 of file NAT.h.
◆ m_timeTillNextSend
| time_t NAT::m_timeTillNextSend |
|
protected |
The number of milliseconds till we send to the other guy's port again.
Definition at line 128 of file NAT.h.
◆ m_timeToWaitForPort
| time_t NAT::m_timeToWaitForPort = 15000 |
|
staticprotected |
◆ m_transport
The documentation for this class was generated from the following files:
- Code/GameEngine/Include/GameNetwork/NAT.h
- Code/GameEngine/Source/GameNetwork/NAT.cpp