#include <Transport.h>
Public Member Functions | |
| Transport () | |
| ~Transport () | |
| Bool | init (AsciiString ip, UnsignedShort port) |
| Bool | init (UnsignedInt ip, UnsignedShort port) |
| void | reset (void) |
| Bool | update (void) |
| Call this once a GameEngine tick, regardless of whether the frame advances. | |
| Bool | doRecv (void) |
| call this to service the receive packets | |
| Bool | doSend (void) |
| call this to service the send queue. | |
| Bool | queueSend (UnsignedInt addr, UnsignedShort port, const UnsignedByte *buf, Int len) |
| Queue a packet for sending to the specified address and port. This will be sent on the next update() call. | |
| Bool | allowBroadcasts (Bool val) |
| void | setLatency (Bool val) |
| void | setPacketLoss (Bool val) |
| Real | getIncomingBytesPerSecond (void) |
| Real | getIncomingPacketsPerSecond (void) |
| Real | getOutgoingBytesPerSecond (void) |
| Real | getOutgoingPacketsPerSecond (void) |
| Real | getUnknownBytesPerSecond (void) |
| Real | getUnknownPacketsPerSecond (void) |
Public Attributes | |
| TransportMessage | m_outBuffer [MAX_MESSAGES] |
| TransportMessage | m_inBuffer [MAX_MESSAGES] |
| UnsignedShort | m_port |
The transport layer handles the UDP socket for the game, and will packetize and de-packetize multiple ACK/CommandPacket/etc packets into larger aggregates.
Definition at line 43 of file Transport.h.
| Transport::Transport | ( | void | ) |
Definition at line 75 of file Transport.cpp.
| Transport::~Transport | ( | void | ) |
Definition at line 81 of file Transport.cpp.
Definition at line 62 of file Transport.h.
| Bool Transport::doRecv | ( | void | ) |
call this to service the receive packets
Definition at line 276 of file Transport.cpp.
| Bool Transport::doSend | ( | void | ) |
call this to service the send queue.
Definition at line 198 of file Transport.cpp.
| Real Transport::getIncomingBytesPerSecond | ( | void | ) |
Definition at line 441 of file Transport.cpp.
| Real Transport::getIncomingPacketsPerSecond | ( | void | ) |
Definition at line 452 of file Transport.cpp.
| Real Transport::getOutgoingBytesPerSecond | ( | void | ) |
Definition at line 463 of file Transport.cpp.
| Real Transport::getOutgoingPacketsPerSecond | ( | void | ) |
Definition at line 474 of file Transport.cpp.
| Real Transport::getUnknownBytesPerSecond | ( | void | ) |
Definition at line 485 of file Transport.cpp.
| Real Transport::getUnknownPacketsPerSecond | ( | void | ) |
Definition at line 496 of file Transport.cpp.
| Bool Transport::init | ( | AsciiString | ip, |
| UnsignedShort | port ) |
Definition at line 86 of file Transport.cpp.
| Bool Transport::init | ( | UnsignedInt | ip, |
| UnsignedShort | port ) |
Definition at line 91 of file Transport.cpp.
| Bool Transport::queueSend | ( | UnsignedInt | addr, |
| UnsignedShort | port, | ||
| const UnsignedByte * | buf, | ||
| Int | len ) |
Queue a packet for sending to the specified address and port. This will be sent on the next update() call.
Definition at line 380 of file Transport.cpp.
| void Transport::reset | ( | void | ) |
Definition at line 167 of file Transport.cpp.
|
inline |
Definition at line 65 of file Transport.h.
|
inline |
Definition at line 66 of file Transport.h.
| Bool Transport::update | ( | void | ) |
Call this once a GameEngine tick, regardless of whether the frame advances.
Definition at line 182 of file Transport.cpp.
| TransportMessage Transport::m_inBuffer[MAX_MESSAGES] |
Definition at line 77 of file Transport.h.
| TransportMessage Transport::m_outBuffer[MAX_MESSAGES] |
Definition at line 76 of file Transport.h.
| UnsignedShort Transport::m_port |
Definition at line 83 of file Transport.h.