BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Suspend Mode

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
Osman AKDEMİR
Guest





PostPosted: Sat Apr 24, 2004 9:26 am    Post subject: Suspend Mode Reply with quote



Hi everybody,

I have an application that's TCP client/Server. Everything is fine but
there is a problem. If I wait long time for ex 2-3 hour without doing
anything (not sending any data between client-server) and after that If I
try to send any data to server which I connected I coludn't send my data or
I colundt get any data. And I jump time out while reading data from
server...
Actually I wanted to ask a question is there a suspend mode (or like
this) in socket programming or winsock or inside the indy component?

Please help me because it's very important....

Thanks for all....


Back to top
Martin James
Guest





PostPosted: Sat Apr 24, 2004 9:41 am    Post subject: Re: Suspend Mode Reply with quote



"Osman AKDEMİR" <osman.akdemir (AT) partneronline (DOT) org> wrote

Quote:
Hi everybody,

I have an application that's TCP client/Server. Everything is fine but
there is a problem. If I wait long time for ex 2-3 hour without doing
anything (not sending any data between client-server) and after that If I
try to send any data to server which I connected I coludn't send my data
or
I colundt get any data. And I jump time out while reading data from
server...
Actually I wanted to ask a question is there a suspend mode (or like
this) in socket programming or winsock or inside the indy component?

No 'suspend mode' is required.

TCP will, by default, keep connections open for ever. If the connection is
closing at one end, it is because you, or possibly some proxy router, is
timing it out somewhere & closing the connection.

Put some debug/breakpoints in to find out which end is disconnecting & fix
the problem. Initially, run the server & client on the same box so there
are no network switches or proxies in the way.

Rgds,
Martin



Back to top
Ben Hochstrasser
Guest





PostPosted: Sat Apr 24, 2004 12:00 pm    Post subject: Re: Suspend Mode Reply with quote



Martin James wrote:

Quote:
TCP will, by default, keep connections open for ever. If the
connection is closing at one end, it is because you, or possibly some
proxy router, is timing it out somewhere & closing the connection.

Many servers (ftp being a typical example) will close connections that were
idle for more than x minutes. Sometimes even the underlying TCP/IP stack
will do this in order to "housekeep" the system.

You may want to send a heartbeat packet every couple of minutes to keep the
connection alive.

--
Ben

Back to top
Milan
Guest





PostPosted: Wed May 12, 2004 1:08 pm    Post subject: Re: Suspend Mode Reply with quote

Yes, Indy has implemented timeout. There's your problem. But it's much
better if you disconnect and connect again after those 2-3 hours. Set
timeout to something like a couple of minutes and connect if disconnected
when sending data.

Quote:
this) in socket programming or winsock or inside the indy component?



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.