ConnectionProtocol
The base class for Torque's networking protocol.
Protected Attributes
Public Functions
buildSendPacketHeader(BitStream * bstream, S32 packetType)
bool
handleNotify(bool recvd)
handlePacket(BitStream * bstream)
processRawPacket(BitStream * bstream)
bool
readDemoStartBlock(BitStream * stream)
sendPacket(BitStream * bstream)
setConnectSequence(U32 connectSeq)
bool
writeDemoStartBlock(ResizeBitStream * stream)
Detailed Description
The base class for Torque's networking protocol.
This implements a sliding window connected message stream over an unreliable transport (UDP). It provides a simple notify protocol to allow subclasses to be aware of what packets were sent succesfully and which failed.
Basically, a window size of 32 is provided, and each packet contains in the header a bitmask, acknowledging the receipt (or failure to receive) of the last 32 packets.
NetConnection, NetProtocol
Protected Attributes
U32 mAckMask
bool mConnectionEstablished
U32 mConnectSequence
U32 mHighestAckedSeq
U32 mLastRecvAckAck
U32 mLastSendSeq
U32 mLastSeqRecvd
U32 mLastSeqRecvdAtSend [32]
Public Functions
ConnectionProtocol()
buildSendPacketHeader(BitStream * bstream, S32 packetType)
connectionEstablished()
handleConnectionEstablished()
Reimplemented by: NetConnection
handleNotify(bool recvd)
Reimplemented by: NetConnection
handlePacket(BitStream * bstream)
Reimplemented by: NetConnection
keepAlive()
Reimplemented by: NetConnection
processRawPacket(BitStream * bstream)
Reimplemented by: NetConnection
readDemoStartBlock(BitStream * stream)
Reimplemented by: NetConnection, GameConnection
sendAckPacket()
sendPacket(BitStream * bstream)
Reimplemented by: NetConnection
sendPingPacket()
setConnectionEstablished()
setConnectSequence(U32 connectSeq)
windowFull()
writeDemoStartBlock(ResizeBitStream * stream)
Reimplemented by: NetConnection, GameConnection