[Twisted-Python] connecting with a FlashXML socket
continuum83 at yahoo.com
Wed Mar 16 11:23:36 EST 2005
my friend and i are attempting to use twisted as a
socket server to be able to accept connections from a
here is the simple connection code on the serverside:
from twisted.protocols import basic
print "new client\n"
print "lost client\n"
print "recieved:", repr(line)
for c in self.factory.clients:
self.transport.write(msg + '\n')
print msg + '\n'
this is basically the same as an example we were using
to help us get the code going. but when we run the
server, and then go to the client... the client
connects fine, but we cannt send/recieve any messages.
we tried setting the self.delimiter = "\0" since that
is a requirement for flashXML, but it still wouldnt
the socket code on the flash-side is relative to the
mySocket = new XMLSocket();
mySocket.onConnect = function(success)
msgArea.htmlText += ";<b>Server connection
msgArea.htmlText += "<b>Server connection
mySocket.onClose = function()
msgArea.htmlText += "<b>Server connection lost</b>"
XMLSocket.prototype.onData = function(msg)
trace("MSG: " + msg)
msgArea.htmlText += msg
mySocket.send(inputMsg.htmlText + "\n")
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
More information about the Twisted-Python