mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Compression needs work but finished the eqstream abstraction layer otherwise.
This commit is contained in:
@@ -144,7 +144,7 @@ void EQStreamIdentifier::Process() {
|
||||
} //end foreach stream
|
||||
}
|
||||
|
||||
void EQStreamIdentifier::AddStream(std::shared_ptr<EQStreamInterface> &eqs) {
|
||||
void EQStreamIdentifier::AddStream(std::shared_ptr<EQStreamInterface> eqs) {
|
||||
m_streams.push_back(Record(eqs));
|
||||
eqs = nullptr;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
|
||||
//main processing interface
|
||||
void Process();
|
||||
void AddStream(std::shared_ptr<EQStreamInterface> &eqs);
|
||||
void AddStream(std::shared_ptr<EQStreamInterface> eqs);
|
||||
EQStreamInterface *PopIdentified();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -900,7 +900,8 @@ void EQ::Net::DaybreakConnection::Decompress(Packet &p, size_t offset, size_t le
|
||||
new_length = (uint32_t)length - 1;
|
||||
}
|
||||
else {
|
||||
return;
|
||||
memcpy(new_buffer, buffer, length);
|
||||
new_length = length;
|
||||
}
|
||||
|
||||
p.Resize(offset);
|
||||
|
||||
@@ -120,7 +120,7 @@ EQApplicationPacket *EQ::Net::EQStream::PopPacket() {
|
||||
}
|
||||
|
||||
EmuOpcode emu_op = (*m_opcode_manager)->EQToEmu(opcode);
|
||||
EQApplicationPacket *ret = new EQApplicationPacket(emu_op, (unsigned char*)p->Data(), p->Length() - m_owner->m_options.opcode_size);
|
||||
EQApplicationPacket *ret = new EQApplicationPacket(emu_op, (unsigned char*)p->Data() + m_owner->m_options.opcode_size, p->Length() - m_owner->m_options.opcode_size);
|
||||
m_packet_queue.pop_front();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -75,8 +75,7 @@ namespace EQ
|
||||
virtual void ReleaseFromUse() { };
|
||||
virtual void RemoveData() { };
|
||||
virtual uint32 GetRemoteIP() const;
|
||||
//the code is dumb and assumes this is in network order...
|
||||
virtual uint16 GetRemotePort() const { return EQ::Net::HostToNetwork(m_connection->RemotePort()); }
|
||||
virtual uint16 GetRemotePort() const { return m_connection->RemotePort(); }
|
||||
virtual bool CheckState(EQStreamState state);
|
||||
virtual std::string Describe() const { return "Direct EQStream"; }
|
||||
virtual void SetActive(bool val) { }
|
||||
|
||||
Reference in New Issue
Block a user