mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
actually call sendReliablePacket for write of reliable
This commit is contained in:
parent
d340515ab3
commit
0f1d1a16a7
2 changed files with 4 additions and 2 deletions
|
@ -85,7 +85,7 @@ qint64 Socket::writePacket(const Packet& packet, const HifiSockAddr& sockAddr) {
|
||||||
|
|
||||||
qint64 Socket::writePacket(std::unique_ptr<Packet> packet, const HifiSockAddr& sockAddr) {
|
qint64 Socket::writePacket(std::unique_ptr<Packet> packet, const HifiSockAddr& sockAddr) {
|
||||||
if (packet->isReliable()) {
|
if (packet->isReliable()) {
|
||||||
auto connection = findOrCreateConnection(sockAddr);
|
findOrCreateConnection(sockAddr)->sendReliablePacket(move(packet));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ void UDTTest::parseArguments() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void UDTTest::sendInitialPackets() {
|
void UDTTest::sendInitialPackets() {
|
||||||
static const int NUM_INITIAL_PACKETS = 500;
|
static const int NUM_INITIAL_PACKETS = 10;
|
||||||
|
|
||||||
int numPackets = std::max(NUM_INITIAL_PACKETS, _maxSendPackets);
|
int numPackets = std::max(NUM_INITIAL_PACKETS, _maxSendPackets);
|
||||||
|
|
||||||
|
@ -187,6 +187,8 @@ void UDTTest::sendPacket() {
|
||||||
|
|
||||||
auto newPacket = udt::Packet::create(packetPayloadSize, _sendReliable);
|
auto newPacket = udt::Packet::create(packetPayloadSize, _sendReliable);
|
||||||
|
|
||||||
|
_totalQueuedBytes += newPacket->getDataSize();
|
||||||
|
|
||||||
// queue or send this packet by calling write packet on the socket for our target
|
// queue or send this packet by calling write packet on the socket for our target
|
||||||
if (_sendReliable) {
|
if (_sendReliable) {
|
||||||
_socket.writePacket(std::move(newPacket), _target);
|
_socket.writePacket(std::move(newPacket), _target);
|
||||||
|
|
Loading…
Reference in a new issue