Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IOCP tutorial
#1
I just did Verrigans tutorial for changing WinSock to IOCP (link)
After fixing some errors it gave me I could finally start the server successfull, but now, when the client wants to create a new account on the server it gets stuck at: Connected, sending account data. The account does get created, so when I hit escape en try to login it gets stuck again, at "Connected, sending account .....". (the server receives the connection though). Does anyone know how I can fix this.
I did the tutorial on a blank version of MSE-Build 1. I also did the tutorial several times but I'm keep getting the same error.

p.s. When I try to run the server after I have done the tutorial, im getting rte's higlighting the code "GameServer.Sockets(Index).anything", I changed it to "GameServer.Sockets.Item(Index).anythin" 'cause it fixed the error, maybe that is the reason it isn't working?
Reply
#2
you did something ttoally werong if its giving you an error on Gamserver.Sockets(index)

but the fact you didnt say what RTE, i cant help to much.
Reply
#3
Run-time error '438'

Object does not support this property or method.

The error dissapears when I change it to GameServer.Sockets.Item(index).
I just still got the problem from before.
Reply
#4
man, is a little late for post this, but well, i post it cause i add iocp today to blindnight ^^U

the Run-time error '438' is fixed the way ice say, cause all the sockets need have the item thing. About the other problem, can be because the client still have the winsock senddata... i change it, and now all works perfect. i think that verrigan tut need be checket a little more ^^ and, of course, reposted here, because iocp is a really needed addon if u want make a "serius" mmorpg (i mean "serius" cause there isn't any real serius mmorpg made in vb ^^U)
Reply
#5
can you plz post it! Smile

' but can you compile it?
Reply
#6
Thanks Xentar, I've got it working now ^^.

phantasy, just follow the tutorial but change all the GameServer.Sockets... to GamerServer.Sockets.Item...

Then when you're done go to client and change Sub SendData to:
Code:
Sub SendData(ByVal data As String)
Dim dbytes() As Byte
  
    dbytes = StrConv(data, vbFromUnicode)
    If IsConnected Then
        frmMirage.Socket.SendData dbytes
        DoEvents
    End If
End Sub
(got that code from a tutorial on elysium).
It should work now Smile
Reply
#7
nice! Big Grin
Reply
#8
Quote:The first thing you need to do is delete the Winsock control from frmServer. Then remove Microsoft Winsock Control from your components list. Then make the following modifications. Smile
--------------------------------------------------------------
?????

wheres wincontrol in frmserver? cant see winsocl

{EDIT} i am stupid i was editing client side :S lol!
Reply
#9
Xentar Wrote:man, is a little late for post this, but well, i post it cause i add iocp today to blindnight ^^U

the Run-time error '438' is fixed the way ice say, cause all the sockets need have the item thing. About the other problem, can be because the client still have the winsock senddata... i change it, and now all works perfect. i think that verrigan tut need be checket a little more ^^ and, of course, reposted here, because iocp is a really needed addon if u want make a "serius" mmorpg (i mean "serius" cause there isn't any real serius mmorpg made in vb ^^U)

I'm pretty sure that the client can stay winsocx without problem. If you do have IOCP in your client, it will only run on WinXP.
Reply
#10
nop, cause is only the method of send data, you don't need install all the iocp system in the client, well, is something minor.

now i have a extrange problem, all works perfect the other day but now i get some errors in the server.
A runtime error 91 and remark this:

Code:
Public Property Get RemoteAddress() As String
    RemoteAddress = mvarSocket.RemoteAddress.Address
End Property

this happen any time i create a account and if i send a wrong login user or pass, but if i have a player registered, i can enter with it and use all the charas... right now i'm trying to figure what happen. the only fix i find was remove the "If player(index).charnum = i Then" on saveplayer... but man, thats the most extrange thing over this problem -_-U
Reply
#11
you probally didn't add in class builder utility and make colSockets into a collection..

col for Collection.. Dur...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)