Jump to content

StreamWriter with No Append

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
I'm trying to emulate a Flash Application, and when it sends data, it will send this

3C 43 4F 4D 4D 41 4E 44 20 49 44 3D 22 37 31 22 3E 35 3C 2F 43 4F 4D 4D 41 4E 44 3E 00
<COMMAND ID="71">5</COMMAND>.

But when I use this
PixWriter.WriteLine("<COMMAND ID=\"71\">5</COMMAND>");
PixWriter.Flush();

3C 43 4F 4D 4D 41 4E 44 20 49 44 3D 22 37 31 22 3E 35 3C 2F 43 4F 4D 4D 41 4E 44 3E 0D 0A
<COMMAND ID="71">5</COMMAND>..


The 0D 0A is a New Line, but It's causing the Server I'm talking to to drop the connection.

So how do I get a Streamwriter to NOT Append 0D 0A to the Data Out

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
Use streamreader.Write() and not writeline, WriteLine will append the end of the line terminator, hense a line.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
PGP_Protector

PGP_Protector

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 253 posts
Posted Image