aboutsummaryrefslogtreecommitdiff
path: root/src/network/connectionthreads.cpp
diff options
context:
space:
mode:
authorLars Hofhansl <larsh@apache.org>2018-07-14 11:38:52 -0700
committerLars Hofhansl <larsh@apache.org>2018-07-14 11:41:05 -0700
commitca8ec46843da054e656d2f63b23d0b1695c023da (patch)
tree647f3c3eb9b73287a2b93af96858d5b120fc6e79 /src/network/connectionthreads.cpp
parentb38c121856965665f5e17b64100873a4bb97bf58 (diff)
downloadminetest-ca8ec46843da054e656d2f63b23d0b1695c023da.tar.gz
minetest-ca8ec46843da054e656d2f63b23d0b1695c023da.tar.bz2
minetest-ca8ec46843da054e656d2f63b23d0b1695c023da.zip
Remove legacy client handling code.
Diffstat (limited to 'src/network/connectionthreads.cpp')
-rw-r--r--src/network/connectionthreads.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/network/connectionthreads.cpp b/src/network/connectionthreads.cpp
index ccdd1423f..5e4397d90 100644
--- a/src/network/connectionthreads.cpp
+++ b/src/network/connectionthreads.cpp
@@ -206,9 +206,6 @@ void ConnectionSendThread::runTimeouts(float dtime)
for (Channel &channel : udpPeer->channels) {
std::list<BufferedPacket> timed_outs;
- if (udpPeer->getLegacyPeer())
- channel.setWindowSize(WINDOW_SIZE);
-
// Remove timed out incomplete unreliable split packets
channel.incoming_splits.removeUnreliableTimedOuts(dtime, m_timeout);
@@ -264,7 +261,7 @@ void ConnectionSendThread::runTimeouts(float dtime)
break; /* no need to check other channels if we already did timeout */
}
- channel.UpdateTimers(dtime, udpPeer->getLegacyPeer());
+ channel.UpdateTimers(dtime);
}
/* skip to next peer if we did timeout */
@@ -428,15 +425,6 @@ void ConnectionSendThread::processReliableCommand(ConnectionCommand &c)
}
return;
- case CONCMD_DISABLE_LEGACY:
- LOG(dout_con << m_connection->getDesc()
- << "UDP processing reliable CONCMD_DISABLE_LEGACY" << std::endl);
- if (!rawSendAsPacket(c.peer_id, c.channelnum, c.data, c.reliable)) {
- /* put to queue if we couldn't send it immediately */
- sendReliable(c);
- }
- return;
-
case CONNCMD_SERVE:
case CONNCMD_CONNECT:
case CONNCMD_DISCONNECT:
@@ -1208,18 +1196,6 @@ SharedBuffer<u8> ConnectionReceiveThread::handlePacketType_Control(Channel *chan
m_connection->SetPeerID(peer_id_new);
}
- // set non legacy mode locally
- dynamic_cast<UDPPeer *>(peer)->setNonLegacyPeer();
-
- // request the same from the remote side
- ConnectionCommand cmd;
-
- SharedBuffer<u8> reply(2);
- writeU8(&reply[0], PACKET_TYPE_CONTROL);
- writeU8(&reply[1], CONTROLTYPE_ENABLE_BIG_SEND_WINDOW);
- cmd.disableLegacy(PEER_ID_SERVER, reply);
- m_connection->putCommand(cmd);
-
throw ProcessedSilentlyException("Got a SET_PEER_ID");
} else if (controltype == CONTROLTYPE_PING) {
// Just ignore it, the incoming data already reset
@@ -1237,9 +1213,6 @@ SharedBuffer<u8> ConnectionReceiveThread::handlePacketType_Control(Channel *chan
}
throw ProcessedSilentlyException("Got a DISCO");
- } else if (controltype == CONTROLTYPE_ENABLE_BIG_SEND_WINDOW) {
- dynamic_cast<UDPPeer *>(peer)->setNonLegacyPeer();
- throw ProcessedSilentlyException("Got non legacy control");
} else {
LOG(derr_con << m_connection->getDesc()
<< "INVALID TYPE_CONTROL: invalid controltype="