Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6142809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:26:20+00:00 2026-05-23T18:26:20+00:00

I have two software to create with AIR: a server and a client. Both

  • 0

I have two software to create with AIR: a server and a client. Both with AS3 and AIR.

I want to avoid having a big architecture with Remote Shared Object, or using BlazeDS, or having to set a Java / Python / … server in the middle.

In order to avoid having to parse socket data in the server and in the client side, I thought about using XMLSocket on the client side: the data arrives in a way which is already parsed by the Flash framework.

However, when I use this XMLSocket with the AIR ServerSocket, the “connect” event returns me a raw Socket on the server side. So I have to manually manage the XML data on the server side.

Is there a way to also use an XMLSocket on the server side to communicate with the client? A kind of trick to convert the returned Socket into an XMLSocket?

If there is an AS3 library which manages that, I did not find it.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:26:21+00:00Added an answer on May 23, 2026 at 6:26 pm

    I totally agree with Adrian in that server side code in ActionScript is going to be bad, Java being syntactically not that far would be much much better: hotspot JIT, multithreaded, with lots of highly optimized server side components.

    Now having said that: XML Socket presents you with a parsed XML, still what is going to be transmitted over the wire will be just XML as text. So performance-wise it is just the same as using a regular socket and parsing yourself. And this can be as easy as:

    var text: Object = <data received>
    var xml: XML = new XML(text);
    

    So once you’ve received a full xml payload you’re ready to go.

    And if you think XMLSocket can take care of getting a full XML before parsing, I did some XML Socket stuff and got XML delivered in two or more fragments and had to cope with it myself, her an example:

    ...
    private var xmlData: String = "";
    private var errorCount: int;
    ...
    
    private function dataHandler(e: DataEvent): void {  
      if (errorCount > 2) {
        errorCount = 0;
        xmlData = "";
      }     
      try {             
        xmlData += e.data;
        processMessage(XML(xmlData));
        // valid XML, clear the buffer
        xmlData = "";
      } catch (error: Error) {
        // otherwise log error and wait for the rest of the XML 
        log.error(error.toString());
        log.error(e.data);
        errorCount++
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two arrays of System.Data.DataRow objects which I want to compare. The rows
I have two classes, and want to include a static instance of one class
I have two spreadsheets... when one gets modified in a certain way I want
I have to create a software that will scan several directories and extracts information
I have a very complex task - create a software that imports XMl files
I want to create a software which windows will detect it as a installed
I have a java project I want to create which will be built on
Both OOD (Object-Oriented-Design) and MVC (Model-View-Controller) architectures have become staples of modern software design.
Let's say I have two Databases like so : DatabaseA create table Table1 (
I have a database on SQL Server 2000. There are only two logical files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.