S
Sid Price
Hello,
I have an application that needs to receive XML documents over a TCP/IP
connection. I have tried several approaches and so far have failed to find
one that I can get to work. The server is sending the XML correctly since I
can replace my XML receiver with a byte buffer and string builder and I see
the document. Here is the code that I am trying to make work:
Dim netStream As NetworkStream = tcpClient.GetStream()
If netStream.CanRead = True Then
Dim oData As XmlDocument = New XmlDocument
oData.Load(netStream) ' read the xml doc from the server ... blocking
call
The "Load" never returns. As I said if I replace the oData.Load call with
code to read the stream into a byte buffer the data is received.
Any help or pointers would be much appreciated,
Sid.
I have an application that needs to receive XML documents over a TCP/IP
connection. I have tried several approaches and so far have failed to find
one that I can get to work. The server is sending the XML correctly since I
can replace my XML receiver with a byte buffer and string builder and I see
the document. Here is the code that I am trying to make work:
Dim netStream As NetworkStream = tcpClient.GetStream()
If netStream.CanRead = True Then
Dim oData As XmlDocument = New XmlDocument
oData.Load(netStream) ' read the xml doc from the server ... blocking
call
The "Load" never returns. As I said if I replace the oData.Load call with
code to read the stream into a byte buffer the data is received.
Any help or pointers would be much appreciated,
Sid.