Question

I am attempting to connect to a python twisted socket server with Flash using XMLSocket. The connect works fine, and so does the receive. However I can't send data to the server.

Is there a specific format I should be using? The reason I ask is because I couldn't read any data with the XMLSocket until the data was in the form "something\0", that is, the data string had to be valid xml followed by the null character. Is there a trick to sending data?

I don't think this a cross site security problem, because if it was, I believe I wouldn't be able to connect or receive.

I am able to connect to the server using telnet and a java client without issues.

EDIT: I figured it out, the problem was my server needed to have the data sent to it end with "\r\n".

Was it helpful?

Solution

To use the XMLSocket class, the server computer must run a daemon that understands the protocol used by the XMLSocket class. The protocol is described in the following list:

  • XML messages are sent over a full-duplex TCP/IP stream socket connection.
  • Each XML message is a complete XML document, terminated by a zero (0) byte.
  • An unlimited number of XML messages can be sent and received over a single XMLSocket connection.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top