Compression needs work but finished the eqstream abstraction layer otherwise.

This commit is contained in:
KimLS
2016-09-25 22:24:28 -07:00
parent 5cad3f62d0
commit 95d4e95400
7 changed files with 27 additions and 41 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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:
+2 -1
View File
@@ -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);
+1 -1
View File
@@ -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;
}
+1 -2
View File
@@ -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) { }