🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8749

Error Handling writing files across network

#8749
From: Marvin Weingarden
Date: Wed, 22 Sep 2004 18:32
17 lines
1611 bytes
Is there a way to manage errors when writing across a network (one XP
machine to another)?  If I turn off the 2nd machine while the write
operation is ongoing, the application seems to lock up for a number of
seconds - before coming responsive again.

I do not want to throw an exception (cannot use TStream).  I have tried
fwrite and placed the breakpoint after the fwrite would fail and it takes
30-60 seconds from the time the 2nd computer is turned off until the
breakpoint is displayed.

I would like to simply note the error and stop writing the file when the
network goes down - how can this be done efficiently.  Also, is there an
efficient way to determine if the network connection is alive (before trying
the write).

Thank you for your assistance.
Marvin
Technical Details
Message-ID: <4151c53d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,213d89a21f38d0ef,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marvin Weingarden" <mweingarden@greeninginc.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Error Handling writing files across network
Date: Wed, 22 Sep 2004 14:32:32 -0400
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 64.79.74.83
Message-ID: <4151c53d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095877949 64.79.74.83 (22 Sep 2004 11:32:29 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail