Skip to main content
Participant
July 15, 2010
Question

Flex socket communication with C# produces problems.

  • July 15, 2010
  • 1 reply
  • 1213 views

I use C# to read a string (BinaryReader.ReadString()) from the socket stream.

But the problem is that flex doesn't writes the string in suitable format, so C# will be able to read that.

C# reads a 7 bit encoded integer which indicates the length of the string, and just then reads the string.

But flex doesn't writes a string in this format (I use socket.WriteUTF(), and even socket.WriteUTFBytes() didn't work), so C# can't read the string.

Here's a little information of how C# reads/writes a string from a socket stream:

http://msdn.microsoft.com/en-us/library/system.io.binarywriter.write7bitencodedint.aspx

This topic has been closed for replies.

1 reply

Participant
July 16, 2010

Wherever I ask this nobody answers me...