HighTechTalks DotNet Forums  

Re: simple question about socket communication

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss Re: simple question about socket communication in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Phill W.
 
Posts: n/a

Default Re: simple question about socket communication - 01-18-2007 , 09:55 AM






Ben wrote:

Quote:
dim theclient as TcpClient = thelistener.AcceptTcpClient()
dim thestream as NetworkStream = theclient.GetStream()
dim recdxmldoc as new XmlDocument()
recdxmldoc.Load(thestream)
I'm /guessing/ things are getting confused as to when and where the
incoming (to the server) data stream is supposed to /end/.

I'd be more tempted to capture and buffer up the incoming stream and
look for the end of the Xml - essentially buffer.EndsWith("</tag>").
Once you've got the whole Xml safely into the server, you can feed it
into the Xml document, muck about with it, then send the result back.

HTH,
Phill W.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.