View Full Version : [DHTML + FSO] Psuedo Sockets

10-22-2007, 06:14 PM
1) CODE TITLE: Psuedo Sockets

2) AUTHOR NAME/NOTES: Gavin Delphia

This demo shows that is is possible to send data packets between 2 applications using javascript on a lan. The purpose of such a feat is intended for making multiplayer games. It requires a shared directory that has read/write access for both computers or you can perform a local test which only reqiures 1 computer and no shared directory. To use you extract the zip on both computers or just open it twice on the same computer 1 at a time though. Once done you can virus scan the hell out of it so you know its safe. Then open "sockets.hta". It will ask you to specify the shared directory such as "\\boyscomputer\c" or if you want to run a local test leave it as "C:\". It will then ask for a 4 digit number. This is to create a instant of the socket. The number must be the same for both instances of the app. The point of the number is to allow multiple instances of the socket that dont interfear with each other. Once thats entered on both instances of the app a host and client will be assigned. A data test will be conducted and the client console will be enabled to send data. Simply type the data in the bar and press send. It will appear in the other application window and that window will be able to respond. The setup is designed to allow for data to be send back and fourth such as in a turn based game but can be adapted to do almost anything.

4) URL TO CODE: "Socket Test.zip"

Feedback is encouraged!!!

10-23-2007, 05:05 PM
I'm not really sure why i haven't received and replies. Maybe pseudo was the wrong choice of words. This really works. It allows for data communication between 2 javascript applications on 2 different computers. The new zip file actually implements this in a number guessing game.

Someone please comment!

10-23-2007, 05:59 PM
I'm sure it does work, and it's very nice, but its value is decreased greatly by the fact that it's IE/Win-only.