Test Test
Test Test

Reputation: 2889

Send data without server in the middle

Using a browser, is it possible using client only technologies (like JS, HTML ...) to send data to another browser without going through the server that servers the HTML page?? I mean if both ends are already synchronized (one has open a port, and the other one sends the data), is it possible to do that?

Upvotes: 1

Views: 830

Answers (3)

nihulus
nihulus

Reputation: 1495

You can't do a direct client-to-client transaction with JS, HTML yet, but if you check red5 to uses Java frame work, it provides RTMP(Real Time Media Protocol) which for P2P connection.

Upvotes: 0

Denys Séguret
Denys Séguret

Reputation: 382170

With only javascript and HTML, the answer is clearly no : you can't establish a direct P2P connection.

There are solutions involving a plugin, for example java (in the case of java, the user has to relax security, usually through signing).

But note that with websockets you connect and exchange through a server but it's efficient enough for most uses (provided your users will accept not to use IE9-). WebSocket programming is easy enough those days (here's an example of a complete chat client/server, googling would give an example for your favorite language) so I really recommend not to try using a plugin.

Upvotes: 2

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114377

HTTP requires a server. For personal projects you can try the web server plug-in for Firefox:

https://addons.mozilla.org/en-us/firefox/addon/pow-plain-old-webserver/

Upvotes: 0

Related Questions