Solved

Can Flash support binary sockets?

Posted on 2006-06-08
4
401 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
  • 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 26

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 26

Author Comment

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

Doug
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now