473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

File Transfer Over TCP/IP

HI ALL,
I HAVE GOT A VERY STRANGE PROBLEM WHILE TRANSFERRING DATA OVER INTERNET.
ACTUALLY I AM SENDING AND RECEIVING DATA BETWEEN TWO APPLICATIONS USING
TCP. WHILE SENDING OR RECEIVING DATA, I WRITE THE DATA TO NETWORK STREAM AND
THEN READ IT
FROM NETWORK STREAM.
BY DOING SO I AM ABLE TO SEND AND RECIEVE DATA OVER LAN. BUT WHEN I USE
INTERNET
CONNECTION OF SPEED AROUND 56 KBPS, THE DATA WHICH I RECEIVE IS CORRUPTED
OR IT IS NOT IN THE SEQUENCE IN WHICH IT WAS SENT. ALSO
THIS PROBLEM OCURS FOR LARGE SIZE OF DATA. FOR SMALLER DATA SIZE LIKE A
STRING, IT WORKS FINE.

ON LAN EVERYTHING WORKS FINE. THE PROBLEM OCCURS ONLY ON INTERNET.

PLEASE HELP ?
Nov 22 '05 #1
3 2190
It sounds like you are using UDP and not TCP as the TCP protocol is designed
to ensure that messages arrives in sequence. If you're using TCP the
underlying network protocol would not allow that to happen.

It really does sound like you are using UDP because you would notice most
problems over the internet with UDP as packets get lost the whole time.

Brian Delahunty
Ireland

"SCHWAKS" wrote:
HI ALL,
I HAVE GOT A VERY STRANGE PROBLEM WHILE TRANSFERRING DATA OVER INTERNET.
ACTUALLY I AM SENDING AND RECEIVING DATA BETWEEN TWO APPLICATIONS USING
TCP. WHILE SENDING OR RECEIVING DATA, I WRITE THE DATA TO NETWORK STREAM AND
THEN READ IT
FROM NETWORK STREAM.
BY DOING SO I AM ABLE TO SEND AND RECIEVE DATA OVER LAN. BUT WHEN I USE
INTERNET
CONNECTION OF SPEED AROUND 56 KBPS, THE DATA WHICH I RECEIVE IS CORRUPTED
OR IT IS NOT IN THE SEQUENCE IN WHICH IT WAS SENT. ALSO
THIS PROBLEM OCURS FOR LARGE SIZE OF DATA. FOR SMALLER DATA SIZE LIKE A
STRING, IT WORKS FINE.

ON LAN EVERYTHING WORKS FINE. THE PROBLEM OCCURS ONLY ON INTERNET.

PLEASE HELP ?

Nov 22 '05 #2
DONT QUOTE ME ON THIS
But:

I seem to remember that TCP guarantees to deliver all the packets you send
but they can be received in any order. So you could send 3 packets 1 - 2 - 3
and receive then as 2 - 3 - 1.

See http://mike.passwall.com/networking/tcppacket.html
there is a 32bit sequence number in the header

You may need to rebuild the data manually after checking the packet headers
for an order indicator or something
Nov 22 '05 #3
TCP is always in the right order.
Greets,

Matthijs ter Woord

"Chris" <Ch***@discussions.microsoft.com> wrote in message news:30**********************************@microsof t.com...
DONT QUOTE ME ON THIS
But:

I seem to remember that TCP guarantees to deliver all the packets you send
but they can be received in any order. So you could send 3 packets 1 - 2 - 3
and receive then as 2 - 3 - 1.

See http://mike.passwall.com/networking/tcppacket.html
there is a 32bit sequence number in the header

You may need to rebuild the data manually after checking the packet headers
for an order indicator or something

Nov 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Lingyun Yang | last post by:
*** post for FREE via your newsreader at post.newsfeed.com *** Dear all, I have a file it's binary data viewed in UltraEdit is EF BB BF 0D 0A 3C ....... I want to read them into a int or long...
11
by: Abhishek | last post by:
I have a problem transfering files using sockets from pocket pc(.net compact c#) to desktop(not using .net just mfc and sockets 2 API). The socket communication is not a issue and I am able to...
11
by: Stephan Steiner | last post by:
Hi Generally, FileInfo fi = new FileInfo(path); long size = fi.Length; gets you the length of a file in bytes. However, when copying files, even while the copy operation is still in...
8
by: Xarky | last post by:
Hi, I am downloading a GIF file(as a mail attachement) with this file format, Content-Transfer-Encoding: base64; Now I am writing the downloaded data to a file with this technique: ...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
1
by: Alex | last post by:
Hello, I'm trying to write a little php script to transfert some files from a server to clients (web/http). It's working fin with small files. But transfering big files (try on 1Gb) failed!...
10
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an...
2
by: tedpottel | last post by:
Hi, My program has the following code to transfer a binary file f = open(pathanme+filename,'rb') print "start transfer" self.fthHandle.storbinary('STOR '+filename, f) How can I do an ASCII...
0
by: fiona | last post by:
Yucca Valley, CA, - October 2007: Catalyst Development Corporation, publisher of SocketTools, SocketWrench and LogicGem, today announced the release of Catalyst File Transfer .NET V5.0. For...
6
by: Thom Little | last post by:
I need to transfer an XML file between an application on the client and the server. This would in fact be a copy of the application's .config file. HTML <input form=...would transfer the file...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.