The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Binary txt file received when i use uuencode to send txt file as attachment ash22 UNIX for Dummies Questions & Answers 2 04-24-2008 05:03 PM
compiled binary file gives "cannot execute binary file" scgupta SUN Solaris 0 07-12-2006 10:59 PM
binary file markms UNIX for Dummies Questions & Answers 1 04-07-2006 06:40 AM
Binary file conversion bubba112557 UNIX for Dummies Questions & Answers 0 01-10-2006 11:06 AM
binary file ramneek UNIX for Dummies Questions & Answers 1 09-13-2005 02:02 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-03-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
Binary File Transfer

I have written a program in C to transfer files between 2 machines . The program uses UDP . At the server the file is saved in the current directory using fwrite . Everything seems to be working exept for one problem . The binary files gets corrupted on the server . Thats is doing a diff of the files in the server and client says it differs . Though the checksum at the server is passed . The bytes at both server and client matches . But ...
Though it works when it comes to text files being passed .
I am stuck and i have nowhere to go .

The above problem dosent show when i make a TCP connection ....


ANy ideas will be appreciated


DP
Reply With Quote
Forum Sponsor
  #2  
Old 03-04-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,658
UDP is unreliable by intent, I would expect that some datagrams would be lost. I can't believe that there is a difference between ascii and binary data. I can believe that there is a difference between a little bit of data and a lot of data. Could you be using small ascii files and large binary files? And your comment that the bytes match throws me. If the bytes are ok, what more do you ask from a file transfer?
Reply With Quote
  #3  
Old 03-04-2002
DPAI's Avatar
Registered User
 

Join Date: Jul 2001
Posts: 112
Well What do i ask,
let me explain
I transfer an image over to the server .
Technically speaking The image should open at the server .
The message is Data corrupted ... cant open
Bytes match at server and client
Checksum match at server and client
Works for ascii text
diff command shows binary files at both places differ

Got it ...

I mean wats the use of this program if th binary file cannot make sense

DP
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0