title: Sending a string over Python server to C# client returns a number of the chars in the string
body: <p>So I've been trying to create a simple chat program with python, but it's a combination of Python and C#... The server is built entirely out of Python and the client is C#. I use sockets for both of them. Data communication works 100%. When I click 'Connect' on the client, it connects and sends this message into the stream.</p>
  
  <pre><code>byte[] sendBytes = new byte[] { };
  sendBytes = Encoding.ASCII.GetBytes("NEW_CONN|");
  clientSock.Send(sendBytes);
  </code></pre>
  
  <p>The server receives this and passes it through to a "accepting" method. The reason I won't show this part is because it works 100%. The problem lies within Server to Client. I don't know if it's a cross-platform problem, but I sure as hell want to find out. Here is the Python server code (for the "parse" method - accept data from the client and respond):</p>
  
  <pre><code>def parseData(sock, message) :
  splitString = message.split('|')
  
  if splitString[0] == "NEW_CONN":
      sendString = "CONN_A|"
      sock.send(sendString)  
      CONNECTION_LIST.append(sock)
      print "Client connected: " + str(sock.getpeername())
  </code></pre>
  
  <p>Now, when the client receives this message, it is simply "7". In other words, the total number of chars that make up sendString. It isn't a client conversion issue, because I've tested outputting the string like this (serverside):</p>
  
  <pre><code>print str(sock.send(sendString))
  </code></pre>
  
  <p>That bit of code outputs "7" as well. What have I done wrong?
  *OTHER INFO:
  RECV_BUFFER = 4096 #Buffer amount variable</p>
  
  <p>Receiving function:</p>
  
  <pre><code>data = sock.recv(RECV_BUFFER)
  parseData(sock, data)
  </code></pre>
  
  <p>You guys have been such a great help in the past. I just want to say thanks!</p>