473,394 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,394 software developers and data experts.

Transfering Data

Hi,

I am writing a client server application using TcpClient and
TcpListener classes.

Now I need to transfer structured large amounts of data. I was
thinking to transfer the data in an xml file, so that both on the
server and on the client side it would be easy to parse the data.

Now if I use the xml file, should the xml file be saved locally? Also
when transfering the xml file, what methods shoulds be used in the
TcpClient/TcpListener classes, ie Read() or Readline() or ReadToEnd(),
or some other appropriate method?
Can someone help me out
Thanks in Advance

Nov 17 '05 #1
2 1942
Should XML file be saved locally is your design decision you cam make
it in-memory also. I think ReadtoEnd() is better once you get
everything you can start parsing the file.
-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 17 '05 #2
If you wanna send file already existing there is no reason to create xml.

To send file use socket.sendfile() method.

If you use TcpListener remember that socket for valid connection is returned
by AcceptSocket.
If use TcpClient, property Client returns socket.

then only Sendfile.
If you have to receive file i recommend:

while ((bufferCount = CONNECTION.Receive(buffer)) > 0)

{

file.Write(buffer, 0, bufferCount);

}

where file is handle to file.

PK

Nov 17 '05 #3

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

Similar topics

2
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every...
1
by: Darshan Mehta | last post by:
Hello, I have an XML file with data in it (no schema). I need to convert this data into an xsl file so that I can display it in Internet Explorer. Can someone help me out with the code? So...
3
by: Lloyd Stevens | last post by:
TABLES CustomerTable CustomerTarrifTable TarrifTable WarrantTable CustomerID(P) CustomerTarrifID(P) TarrifNo(P) WarrantID(P) BoatType QuantityPurchased ProductName WarrantDate...
2
by: Piotr Karwatka | last post by:
Hi! I have a little problem an qeustion. In .NET Windows Forms I can do something like that: - i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd form I have Button1...
10
by: Walshi | last post by:
Hi all, I'm a relative newby to access and VBA etc. My forms and tables etc are working great and saving lots of time...However... I have two databases with the exact same table format. I want...
1
by: ankurgupta76 | last post by:
Hi I have a restaurant billing software developed in vb 6 and ms access db as backend. now for old data i have created another copy of db and called it the master db. So periodically i need...
13
by: hexagram | last post by:
hi guys can anybody can teach me how to do this scenario Transfering Data of a form to a new form The Scenario is: I have a Delivery Receipt Form (Hardware) with a fields of the following ...
0
nomad
by: nomad | last post by:
Hello Everyone: I need some help with transfering a db from my computer to the host. I'm not to sure how to do this so that the webpage know where the db is at. Here is what I have... I'm using...
0
by: Ro | last post by:
I've been given the task of transfering data from an access db to sql server 2000. The previous access db was not structured very well so we reconstructed the tables in sql server 2000 to add...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.