mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Change streams type
This commit is contained in:
parent
5e0b388cf9
commit
f2f05479dc
@ -337,10 +337,20 @@ EQ::Net::DaybreakConnection::DaybreakConnection(DaybreakConnectionManager *owner
|
||||
m_combined[1] = OP_Combined;
|
||||
m_last_session_stats = Clock::now();
|
||||
m_outgoing_budget = owner->m_options.outgoing_data_rate;
|
||||
m_streams = new DaybreakStream*[4];
|
||||
m_streams[0] = nullptr;
|
||||
m_streams[1] = nullptr;
|
||||
m_streams[2] = nullptr;
|
||||
m_streams[3] = nullptr;
|
||||
}
|
||||
|
||||
EQ::Net::DaybreakConnection::~DaybreakConnection()
|
||||
{
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (m_streams[i] != nullptr) {
|
||||
delete m_streams[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EQ::Net::DaybreakConnection::Close()
|
||||
|
||||
@ -190,15 +190,16 @@ namespace EQ
|
||||
size_t resend_delay;
|
||||
};
|
||||
|
||||
struct DaybreakStream
|
||||
class DaybreakStream
|
||||
{
|
||||
public:
|
||||
DaybreakStream() {
|
||||
sequence_in = 0;
|
||||
sequence_out = 0;
|
||||
fragment_current_bytes = 0;
|
||||
fragment_total_bytes = 0;
|
||||
}
|
||||
|
||||
//private:
|
||||
uint16_t sequence_in;
|
||||
uint16_t sequence_out;
|
||||
std::map<uint16_t, Packet*> packet_queue;
|
||||
@ -210,7 +211,7 @@ namespace EQ
|
||||
std::map<uint16_t, DaybreakSentPacket> sent_packets;
|
||||
};
|
||||
|
||||
DaybreakStream* m_streams[4];
|
||||
DaybreakStream** m_streams;
|
||||
std::weak_ptr<DaybreakConnection> m_self;
|
||||
|
||||
void Process();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user