PDA

View Full Version : Internet Server/Client delays commands for a few seconds



Ron
October 13th, 2002, 12:55 PM
I'll check it out, could you in the mean time try it with the abuse protection disabled ?

Ron
October 13th, 2002, 12:55 PM
That is really strange. Are you 100000% percent sure that the last thing is related to the plugin ? Cause there is no link between them two.

Ron
October 13th, 2002, 12:55 PM
Okay never mind, I found that one, I forgot to initialize the TCPIP lib in the client.

Fixed in next release.

Ron
October 13th, 2002, 12:55 PM
Okay I can see the TIME_WAIT things. I cannot get them to block the input but that is probably because I am running the server on Win2K. Win2k probably allows more sockets to be in this state.

to be continued...

Ron
October 13th, 2002, 12:55 PM
I've looked through the source and found one thing that might have caused the blocking. I've modified the server and client accordingly

(removed temporarily)

As a side note the TIME_WAIT things are very normal. If you want to know what they are read this:
http://tangentsoft.net/wskfaq/articles/debugging-tcp.html

If this doesn't solve your problem i'll modify the client to keep the connection open instead of closing and opening all the time.

-Ron

<font size=-1>[ This Message was edited by: RonB on 2002-04-01 20:30 ]</font>

Ron
October 13th, 2002, 12:55 PM
its explained on that page that i linked to.
And win9x is probably limited in the number of sockets that are in this state.

- Ron

Ron
October 13th, 2002, 12:55 PM
Okay there was a little error in the previous package, try this one, as said if the problem persists the only solution is to keep the connection open as far as I know, I anyone thinks (knows) otherwise, please enlighten me.

http://www.girder.nl/temp/eventserver.zip

-Ron

Ron
October 13th, 2002, 12:55 PM
I'll update the client with an option to keep the connection open for a certain amount of time. So it doesn't have to reconnect everytime, thus decreasing the lag. I don't know exactly when I'll have time for this as my classes are starting again tomorrow :sad:

-Ron

Ron
October 13th, 2002, 12:55 PM
I'll try to recreate the problem, do you by any chance hear a beep (winxp/2k) or some equivalent sound under win9x ? ( indicating a dropped event )

-Ron

Ron
October 13th, 2002, 12:55 PM
Ah if its winxp I think it would come out the little motherboard speaker.

Ron
October 13th, 2002, 12:55 PM
It means that the plugin got tired of waiting for Girder to free a semaphore. Technical story... It might happen if the computer is really busy and Girder can't release the semaphore on time.

jediperry
October 13th, 2002, 12:55 PM
one problem I have noticed with this is that if there is some app taking all the cpu time (like dscaler) on the pc running the server, then the connection seems to happen ok as the client status says success and the girder status bar gets to 'Disconnect [ip]' but the girder event doesn't get triggered.

Sorry to hear your classes are starting already, I have another 2 weeks yet so I'm off to Amsterdamm on Saterday :grin:

Mike

jediperry
October 13th, 2002, 12:55 PM
(Winxp) Never heard a beep but then if its from the system speaker I wouldn't cos I don't have one.
I put a sound on the windows proram error event but it didn't do anything when the girder event didn't occur.

jediperry
October 13th, 2002, 12:55 PM
ahh, ill see if i can dig out a speaker from somewhere. Does a dropped event mean it is arriving after a timeout or something?

Jenan773
October 13th, 2002, 12:55 PM
Hi,

First of all, let me say how impressed I am with Girder. I was surprised to find a program with as many nice features as Girder available for free!

Anyways, one thing doesn't work 100% for me. I have two computers running Girder, one with an IR receiver and one with the Internet EventServer. The former forwards commands to the latter, and this works like it should (woo, cool) *the first few commands*.

After about 10 successfully transferred commands, there is a delay of 10-20 seconds before next command is transmitted. I think the cause of this is that the TCP/IP connections are not closed down the way they should (?). Looking with netstat on the forwarding computer (with the IR receiver and the event client), I see several connections to the event server that just hangs around, in mode TIME_WAIT. After a little while, they disappear and the commands start going through again.

The problem appears regardless if I use Girder (with remote or F5-triggering) or the command-line ieventc.exe program.

Has anyone else experienced this, or perhaps even know how to solve the problem?

(The two computers are running Win2000 SP1 ("forwarder") and Win98 (event server).)


Thanks a lot,
/Jens

(Oh, forgot to say that I run v3.1.1.)

<font size=-1>[ This Message was edited by: Jenan773 on 2002-04-01 18:58 ]</font>

Jenan773
October 13th, 2002, 12:55 PM
Thanks! Yep, already tried without the abuse protection, didn't make any difference. I'll try it once more to make sure.


Also, another thing (not sure if this is a bug): On the forwarding computer, I had to activate the Event *Server* (not only the client, which was all I really needed) to be able to send commands. Without it, I got "Cannot find hostname" in the Internet Event Client config window (when I activated the event with my IR remote) which confused me a bit as the server address was a local (although private) IP (192.168.0.2, actually).

However, I solved that by activating the Internet EventServer plugin on the forwarding computer, and just setting a long random password as I would not use it.

Jenan773
October 13th, 2002, 12:55 PM
OK, nice that it was reproducable at least.

Not that I have any idea how the stuff works, but it seems like the client is not sending the correct disconnect command or something. Does the server perhaps have some timeout in the 10-20 seconds range?

Well, good luck on the bug hunt!


[Possible cause]

Ah, great! I'll try it out as soon as I get hold of the new version. Thanks!

<font size=-1>[ This Message was edited by: Jenan773 on 2002-04-01 20:33 ]</font>

Jenan773
October 13th, 2002, 12:55 PM
Great, thanks!

As every command takes a second or two to transfer (is it the socket connect that takes time?) I'm not 100% sure that this solved the problem, but it works much better than before. I will try it out more thoroughly later tonight.

OK, thanks for the link about socket states, I know very little about that stuff and was just speculating on the cause.