Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Packetbuffer for IOCP
#4
Damien, don't get me doubting my knowledge when Im correct. You see this was added with IOCP:
Code:
Public Sub WriteBytes(dbytes() As Byte, Optional thenShutdown As Boolean)
  Call mvarSocket.Write(dbytes, thenShutdown)
End Sub

And for example, the packet buffer had this in the original tutorial:
Code:
If Len(TmpStr) > 0 Then
  Call frmServer.Socket(i).SendData(TmpStr)
End If
And the new has to look like this:
Code:
If Len(TmpStr) > 0 Then
            dbytes = StrConv(TmpStr, vbFromUnicode)
            If IsConnected(i) Then
                GameServer.Sockets(i).WriteBytes dbytes
                DoEvents
            End If
          End If
You see how it uses the '.WriteBytes'. I believe a few other things had to be changed as well.

And also, I helped another person with that code for this IOCP with the packet buffer, and that worked fine for me too.

My former Topic concerning this: http://www.key2heaven.net/ms/forums/vie ... 401aa29e01
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)