Q:

Communication between two computers using an Internet Browser and Sockets?

How may I create a socket on my computer that could be reachable from other computers via internet, and work like a web server, maybe using WebSockets?
By the way: could my web server become visible from the Internet and how?

I know I can install a LAMP web server on my computer (my OS is Ubuntu) and use it for a local network.
I know I can use sockets to let 2 computers communicate via internet using their IP addresses (I did it in Java).

A:

You can make your LAMP server stack accessible from the internet by forwarding ports from your external internet connection to the computer the server stack is running on. If you're doing this at home, you can usually handle port forwarding from the admin interface for your router/modem.
Alternatively, WebRTC is a newer web technology (still in the testing phase) that allows two browsers to connect to each other without the need for an intermediate web server.

