× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David,

Yes, I mean ports.  I understand about sockets being spawned (and Scott's
tutorial is great!).  I would still like to reduce the timeout when a
particular port is not open on the server side.

Mike

----- Original Message -----
From: "David Gibbs" <david@midrange.com>
To: <java400-l@midrange.com>
Sent: Monday, July 29, 2002 6:54 PM
Subject: Re: Sockets question...


> 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
>
> _______________________________________________
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
> To post a message email: JAVA400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l
> or email: JAVA400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
>
>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.