[Spread-users] connecting to spread with Flash
fchary at gmail.com
Thu May 5 05:56:37 EDT 2005
I'm trying to connect to a spread server with an application written in
Actionscript (The language behind Macromedia Flash). I'm essentially porting
the java spread client to actionscript as closely as I can, but I'm running
into a few problems. I know next-to-nothing about c, so looking at the
spread source code hasn't helped me so much.
The key difference between java and actionscript as I see it is that the AS
XMLSocket object doesn't allow you any access to the lower-level socket
streams. You only get two callback methods which are called when the socket
recieves some data. You have to put your data handling code in one of these
callbacks, and wait for data to come in. Conceptually, this isn't a problem
for the porting, I can work around it. The problem seems to be that
XMLSocket isn't 'noticing' when data is sent to it, and the callback isn't
being called at all. I assume that it has to do with Flash not realising
that a stream of data has been terminated. Flash looks for a 0 byte to
terminate a stream, is that what the spread server sends?
I guess what I'm looking for is the communication that happens in the
sendConnect, readAuthMethods and sendAuthMethod methods of the Java client,
from the server's point of view. I hope this all makes sense.
Software Development Intern
ABB Corporate Research
4th Floor, East Wing, Khanija Bhavan
49, Race Course Road
Bangalore 560 001 India
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Spread-users