Solved

Can Flash support binary sockets?

Posted on 2006-06-08
4
406 Views
Last Modified: 2008-01-09
I'm aware that Flash offers an xmlSocket class.  This appears to be limited to sending XML strings as the content.

Can someone confirm whether Flash is able or unable to send arbitrary binary data over a socket?

Thanks,

Doug
0
Comment
Question by:dpearson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:wings_gaurav
ID: 16869324
yes, xmlsocket is just a name - one can transfer and data over it (well almost!). One can send byte streams that don't have '0' byte (\0) as 0 is the string terminator.

how to do:override onData instaed on onXML

XMLSocket.onData = function(src:String)
{

}


-wings
0
 
LVL 27

Author Comment

by:dpearson
ID: 16872259
Interesting.  I guess that means Flash can send arbitrary ASCII data (not just XML) but sending an arbitrary binary stream while guaranteeing there are no embedded 0 bytes sounds pretty tricky at best.

Doug
0
 
LVL 5

Accepted Solution

by:
wings_gaurav earned 50 total points
ID: 16873005
yes, i agree. It will be tricky at best to implement full binary data communication but it is still handy to implement simpler custom protocols without the overhead of XML. one way to overcome the limitation is to use base-64 or other encodings that eliminate the null char.

-wings

0
 
LVL 27

Author Comment

by:dpearson
ID: 16873577
Thanks a lot for the help Wings.

Doug
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to how to record live broadcast.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question