Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MSCPP Beta 0.1
#43
Tony Wrote:
Robin Wrote:
Tony Wrote:Doesn't Winsock handle one request at a time?

and UGH byte arrays.. looks so confusing.

It's really not.

You use the functions to add bytes, integers, strings etc. to the array, then peel them off in the opposite order in the server.

Easy shit.

Yeah I understood a bit of that part by reading up on Verrigan's tutorial but took a peek at his code and his functions
I did not understand one bit of it.

Okay his code here

Code:
nLen = GetIntegerFromBuffer(Buffer, True)
    nBytes = GetFromBuffer(Buffer, nLen, True)
    Sex = GetByteFromBuffer(Buffer, True)
    Class = GetByteFromBuffer(Buffer, True)
    CharNum = GetByteFromBuffer(Buffer, True)

If there types of bytes in order, and it took that byte from the order, how does it know what's what?

The first line calculates the length of the buffer, then it gets the Sex by reading the first byte in the buffer, and removes it. Then, when it get's the class, it'll be the first byte in the buffer.

"It" doesn't know what's what, but the person who programs the packet knows what order the data is in.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)