Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

TCP reconnect after network cable disconnect.

 
   Linux (Home) -> Networking RSS
Next:  Ping William Poaster  
Author Message
gNash

External


Since: Jun 25, 2008
Posts: 4



(Msg. 1) Posted: Thu Aug 27, 2009 1:11 am
Post subject: TCP reconnect after network cable disconnect.
Archived from groups: comp>os>linux>networking (more info?)

Hi ,

I am writing some application like file download through HTTP
protocol.

The application downloading file very fine as along as there was no
disruption network cable.

But when cable disrupting events like unplug and plug after some time,
i could not receive data.
i am using timed out mechanism to avoid blocking in recv() or send().
i was receiving errno as EWOULDBLOCK but i ignored it and keep on
receiving to proceed download further.

i have few more doubts :
i) i could observe the network time out error only once. but each recv
() expected to be returned time out error. is not it?
ii) After plugging the network cable there was no indication for data
receive.

Please help me how to resume the connection. after cable broken or
time out ?

Thanks in advance,
Ganesh
Back to top
Login to vote
Robert Harris

External


Since: Dec 20, 2005
Posts: 42



(Msg. 2) Posted: Thu Aug 27, 2009 11:25 am
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

gNash wrote:
> Hi ,
>
> I am writing some application like file download through HTTP
> protocol.
>
> The application downloading file very fine as along as there was no
> disruption network cable.
>
> But when cable disrupting events like unplug and plug after some time,
> i could not receive data.
> i am using timed out mechanism to avoid blocking in recv() or send().
> i was receiving errno as EWOULDBLOCK but i ignored it and keep on
> receiving to proceed download further.
>
> i have few more doubts :
> i) i could observe the network time out error only once. but each recv
> () expected to be returned time out error. is not it?
> ii) After plugging the network cable there was no indication for data
> receive.
>
> Please help me how to resume the connection. after cable broken or
> time out ?
>
> Thanks in advance,
> Ganesh
>
>
>
If you want to survive unplugging and replugging network cables, why use
timeouts?

Robert
Back to top
Login to vote
David Schwartz

External


Since: May 06, 2008
Posts: 42



(Msg. 3) Posted: Sun Aug 30, 2009 10:17 pm
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 27, 1:11 am, gNash <ganeshamu....DeleteThis@gmail.com> wrote:

> Please help me how to resume the connection. after cable broken or
> time out ?

The connection should resume all by itself. There should be nothing
special you need to do. What goes wrong?

DS
Back to top
Login to vote
nestwasright

External


Since: Sep 01, 2009
Posts: 1



(Msg. 4) Posted: Tue Sep 01, 2009 6:09 am
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 30, 11:17 pm, David Schwartz <dav....RemoveThis@webmaster.com> wrote:
> On Aug 27, 1:11 am, gNash <ganeshamu....RemoveThis@gmail.com> wrote:
>
> > Please help me how to resume the connection. after cable broken or
> > time out ?
>
> The connection should resume all by itself. There should be nothing
> special you need to do. What goes wrong?
>
> DS

This same thing happen to me on my Ubuntu install. It does not matter
what if command I use, up/down, the only way I could go back online is
if I reboot. Strange.
Back to top
Login to vote
David Schwartz

External


Since: May 06, 2008
Posts: 42



(Msg. 5) Posted: Tue Sep 01, 2009 5:32 pm
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sep 1, 6:09 am, nestwasright <nestami... RemoveThis @gmail.com> wrote:

> This same thing happen to me on my Ubuntu install. It does not matter
> what if command I use, up/down, the only way I could go back online is
> if I reboot. Strange.

What is the symptom exactly? Is the interface up? Can you ping your
gateway?

DS
Back to top
Login to vote
Arne Wichmann

External


Since: Sep 03, 2009
Posts: 1



(Msg. 6) Posted: Thu Sep 03, 2009 8:25 am
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <374b1c71-52d0-46a0-b150-120b94c4f93f.DeleteThis@p10g2000prm.googlegroups.com>,
gNash <ganeshamutha.DeleteThis@gmail.com> wrote:
>I am writing some application like file download through HTTP
>protocol.
>
> The application downloading file very fine as along as there was no
>disruption network cable.
>
>But when cable disrupting events like unplug and plug after some time,
>i could not receive data.
>i am using timed out mechanism to avoid blocking in recv() or send().
>i was receiving errno as EWOULDBLOCK but i ignored it and keep on
>receiving to proceed download further.

You might check if you have TCP Keepalives switched on. If you have, switch
them off, if you want your connection to survive network outages.

>i have few more doubts :
>i) i could observe the network time out error only once. but each recv
>() expected to be returned time out error. is not it?

As far as I can see you should get the ETIMEDOUT only once per timeout
event.

>ii) After plugging the network cable there was no indication for data
>receive.

TCP retransmission times can be very long. You should wait at least as long
as the cable was unplugged if you want to test if your connection does
resume.

I hope this helps. Please post your result to the group.

cu

AW
--
[...] If you don't want to be restricted, don't agree to it. If you are
coerced, comply as much as you must to protect yourself, just don't support
it. Noone can free you but yourself. (crag, on Debian Planet)
Arne Wichmann (aw@linux.de)
Back to top
Login to vote
Rick Jones

External


Since: Jun 16, 2005
Posts: 46



(Msg. 7) Posted: Thu Sep 03, 2009 1:25 pm
Post subject: Re: TCP reconnect after network cable disconnect. [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Arne Wichmann <aw.DeleteThis@old-forest.org> wrote:
> You might check if you have TCP Keepalives switched on. If you have,
> switch them off, if you want your connection to survive network
> outages.

.... when there isn't data being actively transferred across the
connection. If the cable disconnect/reconnect tests are happening
while there is activity on the connection, TCP Keepalives on/off won't
matter.

rick jones
--
No need to believe in either side, or any side. There is no cause.
There's only yourself. The belief is in your own precision. - Joubert
these opinions are mine, all mine; HP might not want them anyway... Smile
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
Back to top
Login to vote
Display posts from previous:   
Related Topics:
serial cable connections - I am looking for resources on the web that can teach me how to configure a linux client to connect to a windows server through a serial cable, and use it for web access. The computer I am trying to configure is currently set up in this way with windows....

Intranet plus cable connection. - I have a main Linux computer with two ethernet cards. One card is conected to the Internet via a cable modem. This is all functional. The second card is physically connected to a Windows 98SE computer via an ethernet patch cord. The Windows box also has....

ISDN as a backup for cable (or ADSL) - Hi! Could someone point to HTML/.doc/HOW-TOs on how to make a ISDN (or analog) dialup modem a backup for a broadband connection? Thanks in advance! R.P.

strange problem with cable modem connection - Hello, I have a strange problem with my cable connection. All responsible people are incapable or unwilling to search/solve the problem. In my apartment house all flats share one 2GBit cable modem in the following way: ..

question about networking with a crossover cable and a rou.. - I'm at wit's end and I was wondering if anyone's has tried this out(and got it to work). Here is my setup: Comp1 XP ASUS A7N8X Deluxe with 2 network cards Com2 Fedore Core 4 ASUS A7N8X-E Deluxe with 2 network cards Comp 3 XP (Connected to router) ..
       Linux (Home) -> Networking All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can 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
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact