mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 18:03:27 +02:00
ice test-client uses stun server to get public address
This commit is contained in:
parent
2e0cc158de
commit
b5e216db68
1 changed files with 15 additions and 4 deletions
|
@ -27,14 +27,29 @@ public:
|
||||||
~ICEClientApp();
|
~ICEClientApp();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
enum State {
|
||||||
|
lookUpStunServer, // 0
|
||||||
|
sendStunRequestPacket, // 1
|
||||||
|
waitForStunResponse, // 2
|
||||||
|
talkToIceServer, // 3
|
||||||
|
waitForIceReply, // 4
|
||||||
|
pause0, // 5
|
||||||
|
pause1 // 6
|
||||||
|
};
|
||||||
|
|
||||||
|
void setState(int newState);
|
||||||
|
|
||||||
void doSomething();
|
void doSomething();
|
||||||
void sendPacketToIceServer(PacketType packetType, const HifiSockAddr& iceServerSockAddr,
|
void sendPacketToIceServer(PacketType packetType, const HifiSockAddr& iceServerSockAddr,
|
||||||
const QUuid& clientID, const QUuid& peerID);
|
const QUuid& clientID, const QUuid& peerID);
|
||||||
void icePingDomainServer();
|
void icePingDomainServer();
|
||||||
|
void processSTUNResponse(std::unique_ptr<udt::BasePacket> packet);
|
||||||
void processPacket(std::unique_ptr<udt::Packet> packet);
|
void processPacket(std::unique_ptr<udt::Packet> packet);
|
||||||
|
|
||||||
bool _verbose;
|
bool _verbose;
|
||||||
|
|
||||||
|
HifiSockAddr _stunSockAddr;
|
||||||
|
|
||||||
unsigned int _actionCount { 0 };
|
unsigned int _actionCount { 0 };
|
||||||
unsigned int _actionMax { 0 };
|
unsigned int _actionMax { 0 };
|
||||||
|
|
||||||
|
@ -52,10 +67,6 @@ private:
|
||||||
bool _domainServerPeerSet { false };
|
bool _domainServerPeerSet { false };
|
||||||
NetworkPeer _domainServerPeer;
|
NetworkPeer _domainServerPeer;
|
||||||
|
|
||||||
// 0 -- time to talk to ice server
|
|
||||||
// 1 -- waiting for ICEPingReply
|
|
||||||
// 2 -- pause
|
|
||||||
// 3 -- pause
|
|
||||||
int _state { 0 };
|
int _state { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue