We help IT Professionals succeed at work.

Flash server/client architecture using sockets

Medium Priority
Last Modified: 2013-11-11
I am beginning to work on a Flash project which is an application using client/server socket architecture.
On my server, i will be running a Java server, listening on a port greater than 1024 since Flash security model does not allow me to use ports lower than 1024.
On the client side, a flash application will be used residing on the same host as the server; using a web page/web server.
My question is that should the client make a port forwarding on her router/modem/firewall in order to connect to my server?
If port forwarding is in play, what might be the alternative solution that does not include port forwarding?

Thanks in advance.
Watch Question

Hi lexicon_dominus,

The client just need to know what DNS and port to connnect to and in your server side you need to open the port for your server ip in your router and your firewall to allow incoming connection.

Let say your DNS is www.yourDNS.com and your java server are listerning on port 9999 then in the flash client setting would be:

function connect() {
      mySocket = new XMLSocket();
      mySocket.connect("www.yourDNS.com ", 9999);

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Thank you.
But, does the client have to open port 9999 in her firewall/router?
Hi lexicon_dominus,

Nop the client dont need to open their port only your server need to open port 9999. because your server are listening for incoming connecting on port 9999.


Thank you.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.