开发者

XMLSocket can receive data but not send

开发者 https://www.devze.com 2023-01-31 04:45 出处:网络
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.

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".


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.
0

精彩评论

暂无评论...
验证码 换一张
取 消