Is it possible to create a LAN connection between clients, with a browser application and a running program as the 'server'?

时间:2016-03-04 18:18:51

标签: javascript java sockets networking web-applications

Suppose I create a client application in html and javascript. Each user in the same building, on the same Local Area Network (LAN) has the client application on its computer. The web app is running in the browser, like you can open a html file in your browser. (Example of what you could type in the adress bar C://users/username/.../app.htm)

Then, one client is the server, like in a multiplayer game where you can play together on the LAN. Javascript can send http requests or connect via a socket, but you need something like a http adress to get a connection to another device in the LAN, via the LAN-network. This can be easily done in a java* application. My idea is to create a java program that handles the connection via the LAN. The application running in the browser has to communicate to the java program, and the java program communicates to the server/clients via the LAN.

Is it possible to create something like this? I think the point is in the communication between the in-browser app and the running java program.

  • [*] Java not to be confused with javascript

So, is it actually possible to create something which runs in the browser, and can communicate to an independent program on the same device?

0 个答案:

没有答案