Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding Byte Array
#2
Okay, so I figured out the last question I had on the topic.

Msg and MsgTo. The way you put them in the buffer in the client, the same order they should be called on the server.

For example client side:
Code:
Buffer = ""
  Buffer = AddStringToBuffer(Buffer, MsgTo)
  Buffer = AddStringToBuffer(Buffer, Text)

And then serverside:
Code:
Buffer = FillBuffer(StartAddr, ByteLen)
  
  If ValidateMessage(Index, Buffer) = 1 Then
    MsgTo = FindPlayer(GetStringFromBuffer(Buffer, True))
    
    If MsgTo  Index Then
      If MsgTo > 0 Then
        Msg = GetStringFromBuffer(Buffer, True)
You see how first the MsgTo was put into the buffer on the client. And it was the first thing to be taken out from the buffer serverside. And after that, Text was put in the buffer clientside, and was taken out from the buffer serverside as Msg, AFTER MsgTo. Smile

So now I understand that too Smile

EDIT: Side question: did IOCP remove winsock? Im checking in MSE-Verrigan now, and noticed that the winsock control was removed.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)