|
At 05:43 PM 7/29/2002, you wrote: >I am using an RPG server socket and a Java client socket for inter-program >communications. It is F-A-S-T! I have several socket servers running on >the 400 (in RPG). My clients will try the first socket. If that socket is >available, it will use that socket. If that socket is not open, it will go >to the next socket server and test it. Here is my problem. The time it >takes trying to connect to a server that is not running is too long. Is >there any way to shorten the time for a connect timeout? I'm doing the same thing at work ... you're right, it is quite fast... and a lot easier than I thought it would be (the java part is super simple). Question: when you are referring to the first socket, and the next socket (in your message), are you talking about ports? Strictly speaking, your RPG program should have a single program that listens to the port (I call it a monitor) and, when it receives a connection, it should hand the connection off to another program (a daemon). The daemon's should be self replicating (when one is consumed, another should be spawned). Since all the monitor program does is listen for connections and hand them off, it's very very fast and there should never be a situation when you experience a timeout. The monitor program hands the socket to the daemon via the "GiveDescriptor" api, and the daemon gets the socket via the "TakeDescriptor" api (I'm not 100% sure on the names of the API). Scott Klements sockets tutorial covers this in chapter 7, at http://klement.dstorm.net/rpg/socktut/spawnserver.html. david
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.