Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 158 Vote(s) - 3.7 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google hangout desktop application flow

#1
I am creating a screensharing application that would work in a similar manner like Google Hangout Screen Shares, and I'd like to know how the Google Talk plugin (used for Screen Shares) spawns child processes and uses a dynamic port range.

I am creating a background running application that user will have to install, and which talks with browser like how they describe here,

[To see links please register here]


But when I look at googleTalkPlugin, which is responsible for google hangout screen sharing, I saw that there are a lot of processes running, and whenever I open a new browser, a new talk plugin for that browser starts, as child service.

Here are some snapshots

![when I started safari][1]


![when I started firefox][2]

and when I noticed the port used by googleTalkPlugin, I came to know its dynamic! If you saw the above link, the Browser Desktop communication is on static port.

I am very interested in knowing, how do I use dynamic port numbers? Also, should I create child process for every browser?
Or something better?


[1]:

[2]:
Reply

#2
The reason there is a separate child process for each browser is that the Google Talk application is implemented as a browser plugin. Each browser has a Google Talk plugin installed and doesn't know about the other browsers, their plugins or their subprocesses. Each browser will launch the plugins that it has installed and, as Eduard mentioned in the comments, [some plugins are started in a separate process][1]. This isn't behavior that is special about Google Talk, it is behavior you will see with most plugins. If you implement your application as [a browser plugin][2] you will have the same behavior. If you don't want your application to run as a subprocess of a browser then you will need to write it as a standalone application, not a browser plugin.

If you want to learn more about spawning subprocesses [read up on fork()][3]. There are lots of other good resources around the internet on [subprocesses][4].

Your other question is around dynamic port numbers. The easiest way to do this is to bind to port 0 and you will be assigned a random open port by the operating system. You can then use [getsockname()][5] to find out what port you ended up with. If you are working with a client/server situation you can have the client do this and then just tell the server which port it is using.


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

[4]:

[To see links please register here]

[5]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through