Solved

Can Flash support binary sockets?

Posted on 2006-06-08
4
405 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

Independent Software Vendors: 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

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

749 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