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 7618903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:31:31+00:00 2026-05-31T03:31:31+00:00

I created a Socket and a ServerSocket objects in as3, then I connected the

  • 0

I created a Socket and a ServerSocket objects in as3, then I connected the socket using the connect method by passing to it a host and a port. Also I made the ServerSocket object listening for incoming connection from socket other than the socket I’ve just created. When the ServerSocket detects a connection and start receiving data, the socket object is disconnected automatically. So I want to know how to keep the connection alive in the socket object..

  • 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-31T03:31:33+00:00Added an answer on May 31, 2026 at 3:31 am

    I’m posting this as an answer rather than just referencing this question as a duplicate because your issue is not exactly the same as the question and answer I’m going to reference here. The answer I’m linking to however provides resources that will help you understand the security model behind connecting sockets, which I believe is the issue here:

    air 2.6 serversocket and actionscript 3 socket connection

    An excerpt from the linked resource which demonstrates a “handshake” where the policy file is passed to the connecting socket:

    private function handshakeHandler( event:ProgressEvent ):void
    {
        var socket:Socket = event.target as Socket;
    
        //Read the message from the socket
        var message:String = socket.readUTFBytes( socket.bytesAvailable );
        logCallback( "Received: " + message);
        if( message == "" )
        {
            var policy:String = '\x00';
            socket.writeUTFBytes( policy );
            socket.flush();
            socket.close();
            logCallback("Sending policy: " + policy);
        } else if ( message == "BEGIN" )
        {
            socket.removeEventListener( ProgressEvent.SOCKET_DATA, handshakeHandler );
            socket.addEventListener( ProgressEvent.SOCKET_DATA, socketDataHandler );
            socket.writeUTFBytes( "READY" );
            socket.flush();
        } 
    }
    

    The policy file used in this example is:

    <cross-domain-policy>
        <allow-access-from domain="*" to-ports="8087" />
        </cross-domain-policy>\x00
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Nodejs and Socket.io. When the client connects, new JavaScript objects are created.
Server has created a socket and bound to a port and started a thread
I'm working through Beej's socket tutorial . Using the sample code I've created a
I have created a windows service socket programme to lisen on specific port and
I created a server-client application using the asynchronous socket. I found the problem when
I'm writing a networking program in Java. I use ServerSocket and Socket objects to
I've created a simple method in attempts to determine if a socket is open
I need to create a server socket, which should reject a connect request, if
I've created a simple socket php 5.3 script where the server script calls... socket_select($read_set,
I have created a sample java socket application. I used Socket s = new

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.