Simple ntl example - Client doesn't respond
by Devrim Erdem · in Torque Game Engine · 05/30/2004 (10:22 am) · 7 replies
( I have posted the following question to the mailing list, but for some reason it hasn't made it there.)
Hello,
Warning : network newbie !
I have got the simple example ( http://opentnl.sourceforge.net/doxytree/simpletutorial.html#simpletutorial ) working on linux.
When the example is started, as expected, servers prints the message ( from ::rpcMessageClientToServer() method ). However the ::rpcMessageClientToServer() never gets called. What is wrong ? Is the simple example too simple ?
I would appreciate if any OpenTNL expert could give some hint.
[lastest stable OpenTNL on Linux]
Thanks in advance,
Dev
Hello,
Warning : network newbie !
I have got the simple example ( http://opentnl.sourceforge.net/doxytree/simpletutorial.html#simpletutorial ) working on linux.
When the example is started, as expected, servers prints the message ( from ::rpcMessageClientToServer() method ). However the ::rpcMessageClientToServer() never gets called. What is wrong ? Is the simple example too simple ?
I would appreciate if any OpenTNL expert could give some hint.
[lastest stable OpenTNL on Linux]
Thanks in advance,
Dev
#2
I have got the simple example ( http://opentnl.sourceforge.net/doxytree/simpletutorial.html#simpletutorial ) working on linux.
When the example is started, as expected, servers prints the message ( from ::rpcMessageClientToServer() method ). However the **** ::rpcMessageServerToClient() **** never gets called. What is wrong ? Is the simple example too simple ?
05/31/2004 (12:24 am)
My post is wrong, sorry, it should read :I have got the simple example ( http://opentnl.sourceforge.net/doxytree/simpletutorial.html#simpletutorial ) working on linux.
When the example is started, as expected, servers prints the message ( from ::rpcMessageClientToServer() method ). However the **** ::rpcMessageServerToClient() **** never gets called. What is wrong ? Is the simple example too simple ?
#3
I copied the pieces from the tutorial, built and run the program (version 1.2.1), the server can receive the client's request but fails to send the reply.
I traced the program, and found that the server may not send the request due to this scenario:
at netConnection.cpp, line 629,
mLastUpdateTime == 0
delay == 96
mSendDelayCredit == 1000
the expression (mLastUpdateTime + delay - mSendDelayCredit) should be a negative number, but it is "unsigned int", so the expression is always true.
this is because the first time this function was called, it set mSendDelayCredit=1000, but returned at line 661, leaving mLastUpdateTime still equals to 0.
I wonder if this is a bug.
05/31/2004 (5:54 am)
I have met the same problem as well.I copied the pieces from the tutorial, built and run the program (version 1.2.1), the server can receive the client's request but fails to send the reply.
I traced the program, and found that the server may not send the request due to this scenario:
at netConnection.cpp, line 629,
mLastUpdateTime == 0
delay == 96
mSendDelayCredit == 1000
the expression (mLastUpdateTime + delay - mSendDelayCredit) should be a negative number, but it is "unsigned int", so the expression is always true.
this is because the first time this function was called, it set mSendDelayCredit=1000, but returned at line 661, leaving mLastUpdateTime still equals to 0.
I wonder if this is a bug.
#4
How can I do this ?
05/31/2004 (6:04 am)
So lets assume it is a bug, I want to use rpc function from client to server and the other way around.How can I do this ?
#5
05/31/2004 (6:20 am)
This bug has been fixed in the CVS version of TNL.
#6
I copied the pieces from the tutorial, built and run the program (version 1.2.1), the server can receive the client's request but fails to send the reply.
I traced the program, and found that the server may not send the request due to this scenario:
at netConnection.cpp, line 629,
mLastUpdateTime == 0
delay == 96
mSendDelayCredit == 1000
the expression (mLastUpdateTime + delay - mSendDelayCredit) should be a negative number, but it is "unsigned int", so the expression is always true.
this is because the first time this function was called, it set mSendDelayCredit=1000, but returned at line 661, leaving mLastUpdateTime still equals to 0.
I wonder if this is a bug.
05/31/2004 (6:26 am)
I have met the same problem as well.I copied the pieces from the tutorial, built and run the program (version 1.2.1), the server can receive the client's request but fails to send the reply.
I traced the program, and found that the server may not send the request due to this scenario:
at netConnection.cpp, line 629,
mLastUpdateTime == 0
delay == 96
mSendDelayCredit == 1000
the expression (mLastUpdateTime + delay - mSendDelayCredit) should be a negative number, but it is "unsigned int", so the expression is always true.
this is because the first time this function was called, it set mSendDelayCredit=1000, but returned at line 661, leaving mLastUpdateTime still equals to 0.
I wonder if this is a bug.
#7
Thanks Mark & Haigu.
05/31/2004 (7:39 am)
I have just checked out the version, the tests works fine now.Thanks Mark & Haigu.
Associate Kyle Carter