Solved

Can Flash support binary sockets?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Youtube video error 30 742
how can i learn adobe flex step by step 4 97
black magic design 1 123
deploy Adobe and Java updates to 100 workstations using LogMeIn Pro? 5 150
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

920 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

16 Experts available now in Live!

Get 1:1 Help Now