ExplodyThingy Posted September 29, 2003 Report Posted September 29, 2003 What do you mean? Its a class to store, control, and maniplate packets for either sending or recicieving, and a -*BAD WORD*- good one too.
»Admiral Kirk Posted September 29, 2003 Report Posted September 29, 2003 Ekted, hate to be picky, but your method is completely unportable, which is why its generaly a good idea to use functions to pick data out of a string of bytes, then it is to try and stuff a string of bytes into a struct !@#$%^&*uming the architecture the program is running on uses the same byte order as yours. Of course, if you just want to program like Microsoft, then it hardly matters. Youll notice this kind of blunder in LogicBot in the Settings area. Ive been working on making it endian (sp?) independent. God I hate spelling... Anyway, thats my 1 and 1/2 cents worth.
madhaha Posted September 29, 2003 Report Posted September 29, 2003 Endian is correct (and its programmers slang anyway so isn't a real word).
Mr Ekted Posted September 29, 2003 Report Posted September 29, 2003 C supports structure packing so you can make it match any file/network data. The only issue, as you say, is byte ordering. It is more efficient and clean to view and manipulate packets with structures. It is also less prone to error. It is not unportable whatsoever, or even less portable than the way MERV does it. In fact, the only reason MERV does it that way is because it was originally written in VB which doesn't have structures, so Catid had no choice. When he ported to C++, he just brought over the code as-is for the most part. That's my $2. Keep the change.
catid Posted October 1, 2003 Report Posted October 1, 2003 the only reason MERV does it that way... is because i was learning the protocol as i was writing the bot, and it was easier to write that way. i make up for it by doing those nifty packet diagrams, which i use as a reference as much as the next guy
mister manners Posted October 8, 2003 Author Report Posted October 8, 2003 -*BAD WORD*-, can someone just put the compiled version up on ssdl, or something like that, because its not like i gave msvs
ExplodyThingy Posted October 8, 2003 Report Posted October 8, 2003 A compiled version of what? Merv is up and available. A premade version of my packet class will do absolutely nothing for you. Just binaries that you cant use. All but the typedefs and includes are cut+paste in. I just typed in the typedefs and includes because theyre in diferent files in my bot. Are you sure youre using a console application? Are you sure you have right args in main?
Recommended Posts