473,778 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1961
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.Rece ive(buffer)) > 0)

{

file.Write(buff er, 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
595
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 hour the data that reside on AS400 and transfer into the SQL Server. Services also have to be run in between 8:00 AM and 5:00 PM
1
1574
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 far I tried some of the examples listed in the microsoft website and they are all obsolete in Visual studio.net 2003.
3
1943
by: Lloyd Stevens | last post by:
TABLES CustomerTable CustomerTarrifTable TarrifTable WarrantTable CustomerID(P) CustomerTarrifID(P) TarrifNo(P) WarrantID(P) BoatType QuantityPurchased ProductName WarrantDate CustomerName Cost QuantitySold Season Cost TarrifNo Season CustomerID TarrifNo
2
1510
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 control - on second Form i can acces data from Form1 like that: for example: MessageBox.Show(Form1.TextBox1.Text);
10
2198
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 db1 to be used to input data by a remote operator, when she is ready I want her to be able to click a control button to email her new data to db2. This new data will be added to the table in db2 ready for further processing.
1
1776
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 to transfer data from the current db to the master db also considering the situation wherein the current db may already have some of the data which has already been copied into the master. right now i am first creating a csv file from the current...
13
2731
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 - id - Formatted as "DR-00000" - company - address
0
1574
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 XAMPP to created my db here is the path were the db is at C:\Program Files\xampp\mysql\data I'm using Dreamweaver to create my site. Here is the path where all the files are at C:\Documents and Settings\abc\My Documents\abc\
0
1623
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 better table structure and more functionality. What I want to be able to do is transfer the actual data in the access tables to the new tables in the sql server 2000 db. Does anyone know of a simple way to do this? I've been looking into CA...
0
9629
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10298
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10069
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7475
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5500
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4033
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2865
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.