Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LAN error correction

Status
Not open for further replies.

JJM11

Programmer
Sep 9, 2005
5
ES
Hi.

I wrote a accounting program for use in LANs and I note that, in certains LANs (specially with cheap, old or failing LAN cards), there are data loss or errors with small data packets.

When user replace LAN cards all works fine again.

what kind of error can cause that a program fail with a bad LAN card? Can it be due small data packets does not have error correction? if so, how can I activate this?

Usually, the hardware vendors say "It's a programming failure", then I reply "replace LAN cards and see for yourself".

Program is written in Visual C++ 6 and I'm using the standard stream functions (fopen, fwrite, fread...)

Please, can you help me? My popularity as programmer is not very good due this problem :(

Thanks a lot.
 
I'm using standard file stream functions (fopen, fwrite, fread...) and the LAN protocol that the user (or hardware vendor) decides. I've not influence in that decission.
 
If they're using something like UDP, that's probably why they're losing packets.
 
UDP packets arent guaranteed to arrive, or even if they do, not guaranteed to arrive in the right order.

TCP is reliable (but slower), as such, packets are guaranteed to arrive and arrive in the right order.

Skute

"There are 10 types of people in this World, those that understand binary, and those that don't!"
 
If they don't want to fix their network, you might need to switch to a transaction based file model where you write data to a temp file, then write to the database, then remove the temp file. You'll probably also need to re-read the data from the database to make sure it didn't get corrupted...
 
Read after write (and also after read) is the error check I'm doing actually, but it's veeeery slooooow.

All I need is a hardware (done by LAN card) or software (done by protocol) error correction.

Are there any way to activate them from my program?
Using TCP/IP as transport protocol might help?
What protocol guarantees full error correction besides packet size?
 
TCP/IP is what you want to use, but you said you have no control over the protocol.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top