• Welcome to Valhalla Legends Archive.
 

InsertNTString, InsertNonNTString

Started by Don Cullen, February 12, 2007, 12:17 PM

Previous topic - Next topic

UserLoser

Quote from: BreW on February 13, 2007, 09:57 PM
Haha, I've always treated the keyhash as a 20 byte Non NT string. :(

The definition of a newbie

Ersan

lol this thread should've ended after UL's post...  You guys find any reason to argue don't you.

Don Cullen

Thanks for the help, ya'all. Hopefully I can handle the rest...
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

rabbit

Quote from: [RealityRipple] on February 13, 2007, 06:24 PM
"A series of bytes"... hmm what's another word for series? ARRAY. whaddya know.
You're a douchebag.  There are limiting factors on what I said (IE: null terminator or WORD length).  Stop being a douchebag, you douchebag.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

brew

Quote from: UserLoser on February 13, 2007, 11:40 PM
Quote from: BreW on February 13, 2007, 09:57 PM
Haha, I've always treated the keyhash as a 20 byte Non NT string. :(

The definition of a newbie

So it's not newbie if I use 5 dwords instead?
And for fucks sake shut UP. this isn't an argument thread.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

rabbit

Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

Joe[x86]

BreW, stick a null terminator at the very end of your packet and see if you don't get disconnected for breaking protocol. A Socket is an endpoint of a byte stream. It's not a String.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

brew

It's a stream? Then why do we have packets? And by string, I am refering to an array of bytes. Or chars, for that matter. A string doesn't have to have a null terminator to be a string. A null termintaed string is just an array of bytes, which happens to end with an 0x00.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

rabbit

Quote from: BreW on February 14, 2007, 11:17 AM
A string doesn't have to have a null terminator to be a string.
It's not a string unless it has a null terminator or a specified length.  You're just wrong.  About everything.  Stop posting here.
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

UserLoser

Quote from: BreW on February 14, 2007, 11:17 AM
It's a stream? Then why do we have packets? And by string, I am refering to an array of bytes. Or chars, for that matter. A string doesn't have to have a null terminator to be a string. A null termintaed string is just an array of bytes, which happens to end with an 0x00.

Do you even know what a packet is?  Why do you have them?  A packet is a stream of data that is sent and received between two connected parties in order to communicate.  A simple TCP packet consists of a 24-byte header, then the actual data (or in this case, the Battle.net packet starting with a magic value 255).

To educate your self before attempting to write any sort of application, read this article about different types of strings, and this article about the transmission control protocol.

MyndFyre

Quote from: UserLoser on February 14, 2007, 01:12 PM
(or in this case, the Battle.net packet starting with a magic value 255).
The magic value is -1!  :P
Let's see how many people miss that joke.  I'm well aware that a byte of -1 and 255 are identical.

Quote from: BreW on February 14, 2007, 11:17 AM
It's a stream? Then why do we have packets? And by string, I am refering to an array of bytes. Or chars, for that matter. A string doesn't have to have a null terminator to be a string. A null termintaed string is just an array of bytes, which happens to end with an 0x00.
A string is a logical concept that extends a basic array of bytes or characters and associates special meaning to it.  Specifically, it associates that the bytes or characters are related in a meaningful way.

A TCP/IP connection represents a read/write stream to a destination endpoint.  A packet is a data-link layer component of networking that encapsulates information about data being sent.  If you were to use raw sockets, for instance, you wouldn't actually use a packet.  Of course, data that you put on the network would be virtually meaningless.

We have packets to make our data manageable and meaningful, but the fact that packets exist is something programmers should rarely be conscious of.  JinxBot's WoW plugin interfaces with the socket as a stream, not in terms of packets, reading just enough data to know how much more to read (equivalent to reading the packet header).  The BNCS plugin for JinxBot, and the BNLS extensions of MBNCSUtil v2.0 also treat sockets in this way.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

UserLoser


Joe[x86]

Someone should see how it's handled in Battle.snp (their Socket functions are in there, right?). If it's declared as a unsigned byte, then it's 255, but if it's a signed byte then it's -1. At least, I think so.

But yeah BreW, you know to stop arguing when both rabbit and UserLoser say that I'm right. :P
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

rabbit

Quote from: Joex86] link=topic=16301.msg164940#msg164940 date=1171583309]
But yeah BreW, you know to stop arguing when both rabbit and UserLoser say that I'm right. :P
Hey, we (at least I) never went that far, I only said he was wrong :P
Grif: Yeah, and the people in the red states are mad because the people in the blue states are mean to them and want them to pay money for roads and schools instead of cool things like NASCAR and shotguns.  Also, there's something about ketchup in there.

|