Created
December 5, 2010 04:35
-
-
Save aonic/728800 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <embed width="0" height="0" allowscriptaccess="always" name="flashSock" id="flashSock" | |
| src="./swf/jsCom.swf" type="application/x-shockwave-flash"></embed> | |
| <script type="text/javascript"> | |
| var onData = function(data) { | |
| alert('Server said:' + data); | |
| } | |
| var onClose = function() { | |
| alert('Goodbye.'); | |
| } | |
| // initialize connection with server running on localhost port 3002 (included) | |
| var fs = new AONIC.api.PushCommunication('localhost', '3002', 'flashSock'); | |
| fs.addCallback('onData', onData).addCallback('onClose', onClose); | |
| fs.send('John Doe.'); // -> alert('Server said: Welcome John Doe!'); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment