#include <UdpSessionTransport.hpp>
|
| bool | resolveAddress (const char *host, Uint16 port, UdpEndpointAddr &out, int timeoutMs) |
| void | queueEvent (Event &&event) |
| Peer * | findPeer (std::uint64_t connectionId) |
| Peer * | createServerPeer (const UdpEndpointAddr &from, std::uint32_t clientNonce, bool viaRelay) |
| void | sendConnectionRequest (bool viaRelay) |
| void | sendConnectionAccepted (Peer &peer) |
| bool | sendPacket (Peer &peer, PacketHeader hdr, const void *payload, int payloadLen, int redundancy) |
| bool | sendViaRelay (Peer &peer, PacketHeader hdr, const void *payload, int payloadLen) |
| bool | sendDirect (const UdpEndpointAddr &dest, PacketHeader hdr, const void *payload, int payloadLen, int redundancy) |
| void | processDatagram (UdpReceivedMessage &msg, bool viaRelay) |
| void | processRelayPayload (UdpReceivedMessage &msg) |
| void | processPayload (Peer &peer, PacketHeader hdr, std::vector< std::uint8_t > &&payload, bool viaRelay) |
| void | processAcks (Peer &peer, const PacketHeader &hdr) |
| void | rememberReceived (ChannelState &state, std::uint32_t sequence) |
| bool | acceptUnreliableSequenced (ChannelState &state, std::uint32_t sequence) |
| void | deliverReliable (Peer &peer, ChannelId channel, std::uint32_t sequence, std::vector< std::uint8_t > &&payload, bool viaRelay) |
| void | retransmitReliable (Uint64 nowMs) |
| void | sendKeepAlives (Uint64 nowMs) |
| void | dropTimedOutPeers (Uint64 nowMs) |
◆ EventType
| Enumerator |
|---|
| Connected | |
| Payload | |
| Disconnected | |
| DirectoryControl | |
◆ Mode
◆ UdpSessionTransport() [1/2]
| net::UdpSessionTransport::UdpSessionTransport |
( |
| ) |
|
◆ UdpSessionTransport() [2/2]
| net::UdpSessionTransport::UdpSessionTransport |
( |
const UdpSessionTransport & | | ) |
|
|
delete |
◆ ~UdpSessionTransport()
| net::UdpSessionTransport::~UdpSessionTransport |
( |
| ) |
|
|
inline |
◆ acceptUnreliableSequenced()
| bool net::UdpSessionTransport::acceptUnreliableSequenced |
( |
ChannelState & | state, |
|
|
std::uint32_t | sequence ) |
|
private |
◆ channelIndex()
| std::size_t net::UdpSessionTransport::channelIndex |
( |
ChannelId | channel | ) |
|
|
staticnodiscardprivatenoexcept |
◆ clientConnectionId()
| std::uint64_t net::UdpSessionTransport::clientConnectionId |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ clientNonce()
| std::uint32_t net::UdpSessionTransport::clientNonce |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ close()
| void net::UdpSessionTransport::close |
( |
| ) |
|
◆ connectClient()
| bool net::UdpSessionTransport::connectClient |
( |
const char * | host, |
|
|
Uint16 | port, |
|
|
int | timeoutMs ) |
◆ createServerPeer()
◆ deliverReliable()
| void net::UdpSessionTransport::deliverReliable |
( |
Peer & | peer, |
|
|
ChannelId | channel, |
|
|
std::uint32_t | sequence, |
|
|
std::vector< std::uint8_t > && | payload, |
|
|
bool | viaRelay ) |
|
private |
◆ disconnect()
| bool net::UdpSessionTransport::disconnect |
( |
std::uint64_t | connectionId | ) |
|
◆ dropTimedOutPeers()
| void net::UdpSessionTransport::dropTimedOutPeers |
( |
Uint64 | nowMs | ) |
|
|
private |
◆ findPeer()
◆ isClientConnected()
| bool net::UdpSessionTransport::isClientConnected |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ isKnownChannel()
| bool net::UdpSessionTransport::isKnownChannel |
( |
std::uint8_t | channel | ) |
|
|
staticnodiscardprivatenoexcept |
◆ isOpen()
| bool net::UdpSessionTransport::isOpen |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ isReliable()
| bool net::UdpSessionTransport::isReliable |
( |
ChannelId | channel | ) |
|
|
staticnodiscardprivatenoexcept |
◆ localPort()
| Uint16 net::UdpSessionTransport::localPort |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the local UDP port used by this session transport.
◆ openServer()
| bool net::UdpSessionTransport::openServer |
( |
const char * | bindAddr, |
|
|
Uint16 | port ) |
◆ operator=()
◆ pollEvent()
| bool net::UdpSessionTransport::pollEvent |
( |
Event & | out | ) |
|
◆ preferRelay()
| void net::UdpSessionTransport::preferRelay |
( |
bool | enabled | ) |
|
|
inline |
◆ processAcks()
| void net::UdpSessionTransport::processAcks |
( |
Peer & | peer, |
|
|
const PacketHeader & | hdr ) |
|
private |
◆ processDatagram()
| void net::UdpSessionTransport::processDatagram |
( |
UdpReceivedMessage & | msg, |
|
|
bool | viaRelay ) |
|
private |
◆ processPayload()
| void net::UdpSessionTransport::processPayload |
( |
Peer & | peer, |
|
|
PacketHeader | hdr, |
|
|
std::vector< std::uint8_t > && | payload, |
|
|
bool | viaRelay ) |
|
private |
◆ processRelayPayload()
◆ pump()
| void net::UdpSessionTransport::pump |
( |
| ) |
|
◆ queueEvent()
| void net::UdpSessionTransport::queueEvent |
( |
Event && | event | ) |
|
|
private |
◆ rememberReceived()
| void net::UdpSessionTransport::rememberReceived |
( |
ChannelState & | state, |
|
|
std::uint32_t | sequence ) |
|
private |
◆ resolveAddress()
| bool net::UdpSessionTransport::resolveAddress |
( |
const char * | host, |
|
|
Uint16 | port, |
|
|
UdpEndpointAddr & | out, |
|
|
int | timeoutMs ) |
|
private |
◆ retransmitReliable()
| void net::UdpSessionTransport::retransmitReliable |
( |
Uint64 | nowMs | ) |
|
|
private |
◆ send()
| bool net::UdpSessionTransport::send |
( |
std::uint64_t | connectionId, |
|
|
ChannelId | channel, |
|
|
const void * | payload, |
|
|
int | payloadLen, |
|
|
int | redundancy = 1 ) |
◆ sendConnectionAccepted()
| void net::UdpSessionTransport::sendConnectionAccepted |
( |
Peer & | peer | ) |
|
|
private |
◆ sendConnectionRequest()
| void net::UdpSessionTransport::sendConnectionRequest |
( |
bool | viaRelay | ) |
|
|
private |
◆ sendDirect()
| bool net::UdpSessionTransport::sendDirect |
( |
const UdpEndpointAddr & | dest, |
|
|
PacketHeader | hdr, |
|
|
const void * | payload, |
|
|
int | payloadLen, |
|
|
int | redundancy ) |
|
private |
◆ sendDirectoryControl()
| bool net::UdpSessionTransport::sendDirectoryControl |
( |
const UdpEndpointAddr & | dest, |
|
|
const void * | payload, |
|
|
int | payloadLen ) |
Send a directory-control payload from the same UDP socket.
◆ sendKeepAlives()
| void net::UdpSessionTransport::sendKeepAlives |
( |
Uint64 | nowMs | ) |
|
|
private |
◆ sendPacket()
| bool net::UdpSessionTransport::sendPacket |
( |
Peer & | peer, |
|
|
PacketHeader | hdr, |
|
|
const void * | payload, |
|
|
int | payloadLen, |
|
|
int | redundancy ) |
|
private |
◆ sendViaRelay()
| bool net::UdpSessionTransport::sendViaRelay |
( |
Peer & | peer, |
|
|
PacketHeader | hdr, |
|
|
const void * | payload, |
|
|
int | payloadLen ) |
|
private |
◆ seqAcked()
| bool net::UdpSessionTransport::seqAcked |
( |
std::uint32_t | seq, |
|
|
std::uint32_t | ack, |
|
|
std::uint32_t | ackBits ) |
|
staticnodiscardprivatenoexcept |
◆ seqMoreRecent()
| bool net::UdpSessionTransport::seqMoreRecent |
( |
std::uint32_t | s1, |
|
|
std::uint32_t | s2 ) |
|
staticnodiscardprivatenoexcept |
◆ setPunchAssist()
| void net::UdpSessionTransport::setPunchAssist |
( |
PunchAssist | assist | ) |
|
◆ setRelayConfig()
| void net::UdpSessionTransport::setRelayConfig |
( |
const RelayConfig & | cfg | ) |
|
◆ stats()
| const Stats & net::UdpSessionTransport::stats |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ clientConnectionId_
| std::uint64_t net::UdpSessionTransport::clientConnectionId_ = 0 |
|
private |
◆ clientNonce_
| std::uint32_t net::UdpSessionTransport::clientNonce_ = 0 |
|
private |
◆ connectionByClientNonce_
| std::unordered_map<std::uint32_t, std::uint64_t> net::UdpSessionTransport::connectionByClientNonce_ |
|
private |
◆ endpoint_
◆ events_
| std::deque<Event> net::UdpSessionTransport::events_ |
|
private |
◆ k_keepAliveMs
| Uint64 net::UdpSessionTransport::k_keepAliveMs = 1000 |
|
staticconstexprprivate |
◆ k_maxPeers
| std::size_t net::UdpSessionTransport::k_maxPeers = 128 |
|
staticconstexprprivate |
◆ k_maxQueuedEvents
| std::size_t net::UdpSessionTransport::k_maxQueuedEvents = 1024 |
|
staticconstexprprivate |
◆ k_maxReliableOrderedBuffer
| std::size_t net::UdpSessionTransport::k_maxReliableOrderedBuffer = 256 |
|
staticconstexprprivate |
◆ k_maxReliablePending
| std::size_t net::UdpSessionTransport::k_maxReliablePending = 256 |
|
staticconstexprprivate |
◆ k_retransmitFloorMs
| Uint64 net::UdpSessionTransport::k_retransmitFloorMs = 80 |
|
staticconstexprprivate |
◆ k_routeUnhealthyMs
| Uint64 net::UdpSessionTransport::k_routeUnhealthyMs = 3000 |
|
staticconstexprprivate |
◆ k_timeoutMs
| Uint64 net::UdpSessionTransport::k_timeoutMs = 5000 |
|
staticconstexprprivate |
◆ lastConnectAttemptMs_
| Uint64 net::UdpSessionTransport::lastConnectAttemptMs_ = 0 |
|
private |
◆ mode_
◆ peers_
| std::unordered_map<std::uint64_t, Peer> net::UdpSessionTransport::peers_ |
|
private |
◆ preferRelay_
| bool net::UdpSessionTransport::preferRelay_ = false |
|
private |
◆ punchAssist_
◆ punchDirectoryAddr_
◆ relayAddr_
◆ relayConfig_
◆ rng_
| std::mt19937_64 net::UdpSessionTransport::rng_ |
|
private |
◆ serverAddr_
◆ stats_
| Stats net::UdpSessionTransport::stats_ |
|
private |
The documentation for this class was generated from the following files: