Reserve 1 channel for game replay transfer
This commit is contained in:
@@ -75,7 +75,8 @@ Event::Event(ENetEvent* event, std::shared_ptr<STKPeer> peer)
|
||||
{
|
||||
throw std::runtime_error("Unencrypted content at wrong state.");
|
||||
}
|
||||
if (m_peer->getCrypto() && event->channelID == EVENT_CHANNEL_NORMAL)
|
||||
if (m_peer->getCrypto() && (event->channelID == EVENT_CHANNEL_NORMAL ||
|
||||
event->channelID == EVENT_CHANNEL_DATA_TRANSFER))
|
||||
{
|
||||
m_data = m_peer->getCrypto()->decryptRecieve(event->packet);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ enum EVENT_CHANNEL : uint8_t
|
||||
{
|
||||
EVENT_CHANNEL_NORMAL = 0, //!< Normal channel (encrypted if supported)
|
||||
EVENT_CHANNEL_UNENCRYPTED = 1,//!< Unencrypted channel
|
||||
EVENT_CHANNEL_COUNT = 2
|
||||
EVENT_CHANNEL_DATA_TRANSFER = 2,//!< Data transfer channel (like game replay)
|
||||
EVENT_CHANNEL_COUNT = 3
|
||||
};
|
||||
|
||||
enum PeerDisconnectInfo : unsigned int;
|
||||
|
||||
Reference in New Issue
Block a user