GPWiki.org
GPWiki.org
It is currently Sun May 19, 2013 11:26 am

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Thu Feb 25, 2010 7:40 pm 
Level 1 Cleric

Joined: Sat Nov 07, 2009 10:47 am
Posts: 14
Hi all. I'm making my mmorpg with vb6 and i'm having a problem :)

I have this:
Code:
lResult = setsockopt(GameSocket.SocketHandle, IPPROTO_TCP, TCP_NODELAY, 1, 4)
    If (lResult = SOCKET_ERROR) Then
      MsgBox "Error setting TCP_NODELAY option: " & CStr(Err.LastDllError)
    End If


I don't get any errors and i check with getsockopt i get it's disabled. But why it doesn't work?? I turned it off on client and server.

Can anyone help me??

Sorry my bad english :)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 28, 2010 11:58 am 
Level 1 Cleric

Joined: Sat Nov 07, 2009 10:47 am
Posts: 14
anyone? :(


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2010 12:07 am 
Dexterous Droid

Joined: Fri Aug 19, 2005 10:34 am
Posts: 3650
So it turns off properly, it says its disabled, but its not actually disabled? How do you know its not actually disabled?

_________________
NetGore - Open source online RPG engine


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2010 6:00 am 
Level 22 Norse Warrior-Librarian
User avatar

Joined: Mon Sep 04, 2006 5:25 pm
Posts: 517
Location: U.S.
I have a sneaking suspicion it's not that line that's causing the problem. If you comment out all of the lines you showed us except for the
Code:
MsgBox "Error setting TCP_NODELAY option: " & CStr(Err.LastDllError)


line, do you get any sort of error message?

My guess is that WinSock isn't being initialized properly, or something else has gone wrong with it earlier in the program.

Hope that helps :)
-wyrmmage

_________________
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Programming tutorials and web-design services: http://www.wyrmmage.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2010 2:35 pm 
Level 1 Cleric

Joined: Sat Nov 07, 2009 10:47 am
Posts: 14
Spodi wrote:
So it turns off properly, it says its disabled, but its not actually disabled? How do you know its not actually disabled?


Because nothing is changed. It sends the data like before :(

I'm trying this for a test:
Code:
dim i as long
for i = 1 to 8192
   Socket.SendData Cstr(i)
next i


And i get the same with TCP_NODELAY on or off.. I get:
1234567891011121314 etc.... in 4 or 5 packets.

And if i test it with my game, when i send 3 byte, it doesn't send it but it wait for others data :(

It's strange. If i try with getsockopt it says TCP_NODELAY = 1 after i change it or 0 for normal :(

Edit
I set True the TCP_NODELAY property in the Connect event.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 01, 2010 8:56 pm 
Level 1 Cleric

Joined: Sat Nov 07, 2009 10:47 am
Posts: 14
Spodi, you suggest to use Sox Wrapper in a post (i don't remember where i read [not on this forum] ) and today i converted my client/server to it :) How i can test TCP_NODELAY? And i have a problem.. After i send the message from the server: 1085 0 0 (a long and 2 byte) it stop .-. I test for 4 hours and i get everytime FD_WRITE on the Sox's server and client, but they are on the receiving state O.O What can i do? Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 04, 2010 3:31 pm 
Level 1 Cleric

Joined: Sat Nov 07, 2009 10:47 am
Posts: 14
Anyone? no?

I've found others... It's about the Do-Loop cycle for the rendering. If i use Do-Loop:

Code:
If InGame = True Then
    {physic}
    {rendering}
    DoEvents
End If


The Sox control doesn't receive the data .-. It wait for the loop's end .-. Why? I take a look on vbGore and there too there's the cycle with Do Loop. Is because i call the GameLoop Routine from DataArrival?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group