Skip to main content
IGZN
Inspiring
January 25, 2018
Answered

Network Discovery

  • January 25, 2018
  • 1 reply
  • 1189 views

Hi people!

I'm thinking of making an app with the following characteristics:

  • 1 master (server) app with SocketServer (or anything else that works). This can be a mobile app and/or a desktop app
  • Several client apps can connect to this server app where users can do specific things (mobile apps) over a Socket (or any other working connection)
  • All of the apps are on the same network (home or office WiFi for example), no internet connection is needed

My question that I need your help with:

  • Is there any non-intrusive way for the clients to discover the server's IP address and port?

Notes:

  • I want to avoid IP and port scanning since they're somewhat intrusive (WiFi routers might have firewall rules enabled), resource-intensive and and slow if the response is from the scanned IP address is slow. Scanning 65536 ports for 256x256 ip addresses is not really feasible (edit: even if the server app is using one specific port like 6666, it's still a lot of IP addresses to check for a running server)
  • I want to avoid that users have to enter IP address and port, it's not really a user-friendly way to connect to a server
  • I kinda like to make it how it works on VLC media player or on my TV which can easily found my running UPNP/DLNA server on my PC without any user interaction and play videos with a few taps

Does anyone have any experience with this kind of network discovery in AIR?

Thank you

Message was edited by: Tamas Sopronyi

This topic has been closed for replies.
Correct answer zwetan_uk

IGZN  wrote

Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for

read the materials, it is what you're looking for: network discovery

it works on LAN and without a server

IGZN  wrote

First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.

Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clients, client apps would not know where to connect, or every client would be connected to the same group which is just not good.

While I appreciate your reply, it's not really what I'm looking for.

RTMFP on a local network does not need a Cirrus server or any kind of central server
each clients are at the same time client and server, it is called a P2P network

it is all there in the link provided above

and does support the scenario of having 2 different servers etc.

your clients can not magically connect to the right server
that's what is network discovery: the client provided with a list of networks decide to which one to connect to

it would be the same with other auto discovery protocols like Bonjour, etc.

1 reply

Inspiring
January 30, 2018

IGZN  wrote

  • All of the apps are on the same network (home or office WiFi for example), no internet connection is needed

My question that I need your help with:

  • Is there any non-intrusive way for the clients to discover the server's IP address and port?

Yes, you want to use RTMFP
and it is available in Flash Player and Adobe AIR

read this about RTMFP
Peer-assisted networking using RTMFP groups in Flash Player 10.1 | Adobe Developer Connection


read this to use it on a local network (without the need of a server)
P2P on the local network

(code example from slide 38)

IGZN
IGZNAuthor
Inspiring
January 30, 2018

Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for.

First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.

Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clients, client apps would not know where to connect, or every client would be connected to the same group which is just not good.

While I appreciate your reply, it's not really what I'm looking for.

zwetan_ukCorrect answer
Inspiring
January 30, 2018

IGZN  wrote

Thanks, great find, but i'm familiar with RTMFP, it's not really what I'm looking for

read the materials, it is what you're looking for: network discovery

it works on LAN and without a server

IGZN  wrote

First it still needs to be connected to Adobe Cirrus, where the peer ids are stored.

Second there's no way to tell to which group the clients should connect except if it's hard coded in the client apps which i want to avoid. Imagine having 2 servers on the same network with multiple clients, client apps would not know where to connect, or every client would be connected to the same group which is just not good.

While I appreciate your reply, it's not really what I'm looking for.

RTMFP on a local network does not need a Cirrus server or any kind of central server
each clients are at the same time client and server, it is called a P2P network

it is all there in the link provided above

and does support the scenario of having 2 different servers etc.

your clients can not magically connect to the right server
that's what is network discovery: the client provided with a list of networks decide to which one to connect to

it would be the same with other auto discovery protocols like Bonjour, etc.