What method is there available to communicate 2 computers using Javascript & Ajax? -
the whole point understand how computers should communicate each other using javascript (no jquery framework) , ajax (by using xmlhttprequest). have memory game , add online option people can play friends. thinking peer 2 peer connection, didn't know how , why posted question (i sorry if question not meant here). had in mind:
user 1: 1. click->sendaction server
server: 1. receiveinfo->savedetailsindb 2. packreceivedinfo->send user 2
user 2: 1. receiveinfo->updatedetails
edit: fstanis, know should use websocket method in order communicate users/computers each other.
to answer question - there no way make 2 users communicate each other using ajax (xmlhttprequest) directly (e.g. without server relay messages them). xmlhttprequest requires 1 of users have http server running , it's impossible browser act http server.
what you're looking websocket - allow build own client-server architecture independent on underlying http server.
Comments
Post a Comment