jSocket JavaScript的Socket通讯包

程序名称:jSocket

授权协议: MIT

操作系统: 跨平台

开发语言: JavaScript

jSocket 介绍

jSocket 是 JavaScript 实现 Socket 通讯的解决方案。

示例代码

<script type='text/javascript'>  
        // Host we are connecting to  
        var host = 'localhost';   
        // Port we are connecting on  
        var port = 3000;  
          
        var socket = new jSocket();  
          
        // When the socket is added the to document   
        socket.onReady = function(){  
                socket.connect(host,port);                
        }  
          
        // Connection attempt finished  
        socket.onConnect = function(success){  
                if(success){  
                        // Send something to the socket  
                        socket.send('Hello world');               
                }else{  
                        alert('Connection to the server Could not be estabilished');              
                }         
        }  
        socket.onData = function(data){  
                alert('Received from socket: '+data);     
        }  
          
        // Setup our socket in the div with the id="socket"  
        socket.setup('#socket');          
 </script>

jSocket 官网

http://code.google.com/p/jsocket/

相关编程语言

MuPlayer 是一款跨平台、轻量级的音频播放解决方案,...
OS FLV 是一个 开源和可嵌入网页的flv播放器。 这个...
DewPlayer音乐播放器,样式很简单,而且很实用.播放器...
JW FLV MEDIA PLAYER是一个开源的在网页上使用的Fla...
Speakker 是一个基于 Web 浏览器的音乐播放器,只提...
Player Framework 是一个开源的支持 HTML5 的视频播...