![]() |
Zlip mixed with IOCP+PackerBuffer - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Zlip mixed with IOCP+PackerBuffer (/showthread.php?tid=333) |
Zlip mixed with IOCP+PackerBuffer - William - 30-09-2006 So, I can't seem to get ZLip working correctly serverside. Client side was easy. You see after installing IOCP and the packet buffer to it, I wanted to try Zlip. But the packetbuffer sub SendQueuedData had to be changed in order to work with IOCP (thanks Obsidian). So here is my SendQueuedData sub with IOCP and the packet buffer added: Code: Sub SendQueuedData() Code: Sub SendQueuedData() Related Topics Zlib: http://ms.shannaracorp.com/backup-forum ... sp?TID=218 PacketBuffer: http://ms.shannaracorp.com/backup-forum ... sp?TID=224 IOCP: http://ms.shannaracorp.com/backup-forum ... sp?TID=120 - Matt - 30-09-2006 You keep saying Zlip, instead of Zlib. Why don't you compare all of them, find the differences, and just add all the differences into one sub? - Robin - 30-09-2006 I added ZLib into one of my sources. It worked fine, except when it was compiled. It only worked correctly when it was run in VB. Does anyone else have that problem? - Misunderstood - 30-09-2006 You don't understand what zlib does do you? Well here it is. Just using strings with zlib: Code: If Len(TmpStr) > 0 Then If it can decrypt byte arrays faster(which it should) theres probably a better way. - William - 30-09-2006 @Advocate: Just noticed I wrote both Zlib and Zlip.. hehe anyway, just a spelling error.. @Misunderstood: If I understood Zlib correctly, I think it Compresses the data (encrypts it). And it doesn't make the packets bigger, that why Zlib is so good. And it also allows for decryption. WHich means that the encryption actually is a compression.. well anyway. The code you posted, is that only what should be changed? @Kite: Dont know yet, cause I aint got it working yet. ALthough I will try with Miss code first. - Misunderstood - 30-09-2006 Well it is the only place data is sent to the client right? If it is, then yes, otherwise, no. - Spodi - 30-09-2006 Most any compression you find will make packets bigger, or not compress them more then a byte or two, unless you have packets >150 bytes (in which case, for a 2D game, you're already ****ed). ZLib compresses in byte arrays, as does like every other encryption / compression. Quote:dbytes = StrConv(TmpStr, vbFromUnicode) That is turning your string into a byte array right there. - William - 30-09-2006 Zlib Home Site Wrote:the compression method currently used in zlib essentially never expands the data. - Spodi - 30-09-2006 I have done plenty of testing with tons of different compression algorithms on packets ranging from like 3 bytes to 300 bytes. "Essentially never" may not apply to insanely small data. :wink: - William - 30-09-2006 Okay Im following your advice, and will not add Zlib. Thanks - Spodi - 30-09-2006 Glad I could be of help. :wink: - pingu - 30-09-2006 I'd add it more of a conditional type of thing. You know, adding it for the biggest packets and such. - William - 30-09-2006 pingu Wrote:I'd add it more of a conditional type of thing. You know, adding it for the biggest packets and such. I don't see a reason for that, either you have it for all or none. That my opinion at least. And I don't think the biggest once will help you anything, but let Spodi respond ![]() - Spodi - 30-09-2006 Well you shouldn't have packets that large, especially not sent more then once every few minutes. If you do for some really wierd reason, though, you can add a check of the packet size first (>250 bytes) then compress it and check if the compression did much of anything (discard the compression if < 10 bytes saved). If it did compress, add a byte to the start of the packet that states it is compressed. - William - 30-09-2006 How do you check the size of a packet? - Obsidian - 01-10-2006 you can remove that enigmaencrypt... that was something else i was working on before i sent you that code... :roll: |