http://tech.mozilla.com.tw/posts/4803/%E5%83%8F%E5%8E%9F%E7%94%9F%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F%E4%B8%80%E6%A8%A3%E7%9A%84-webapp%EF%BC%9F%E8%B6%95%E5%BF%AB%E5%AD%B8%E8%B5%B7%E4%BE%86%EF%BC%81
firefox webapp開發網頁
2015年11月29日 星期日
jSocket code
<div id='mySocket'>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>
</div>
<script src="https://jsocket.googlecode.com/svn-history/r119/trunk/jsocket/src/jsocket.js"></script>
<script>
var socket = null;
function openTCP() {
socket = new jSocket();
socket.onReady = function(){
socket.connect('192.168.27.245', 7142);
}
// Connection attempt finished
socket.onConnect = function(success, msg){
if(success){
// Send something to the socket
console.log("TCP connection established sucessfully");
socket.write('Hello world');
}else{
console.log("TCP connection established fail");
alert('Connection to the server could not be estabilished: ' + msg);
}
}
socket.onData = function(data){
alert('Received from socket: '+data);
}
// Setup our socket in the div with the id="socket"
socket.setup('mySocket');
}
function closeTCP() {
socket.halfClose();
socket.close();
if (socket.closed) {
console.log("TCP socket has been cleanly closed");
};
}
</script>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>
</div>
<script src="https://jsocket.googlecode.com/svn-history/r119/trunk/jsocket/src/jsocket.js"></script>
<script>
var socket = null;
function openTCP() {
socket = new jSocket();
socket.onReady = function(){
socket.connect('192.168.27.245', 7142);
}
// Connection attempt finished
socket.onConnect = function(success, msg){
if(success){
// Send something to the socket
console.log("TCP connection established sucessfully");
socket.write('Hello world');
}else{
console.log("TCP connection established fail");
alert('Connection to the server could not be estabilished: ' + msg);
}
}
socket.onData = function(data){
alert('Received from socket: '+data);
}
// Setup our socket in the div with the id="socket"
socket.setup('mySocket');
}
function closeTCP() {
socket.halfClose();
socket.close();
if (socket.closed) {
console.log("TCP socket has been cleanly closed");
};
}
</script>
TCP test
<script>
var mySocket = null;
function openTCP() {
mySocket = new navigator.TCPSocket("www.tsvs.ntpc.edu.tw", 80);
if (mySocket.opened) {
console.log("TCP connection established sucessfully");
mySocket.writeable.write("Hello World");
} else {
console.log("TCP connection established fail");
};
};
function closeTCP() {
mySocket.halfClose();
mySocket.close();
if (mySocket.closed) {
console.log("TCP socket has been cleanly closed");
};
};
</script>
<a class="v001" href="#" >櫻樹 變 櫻花</a>
<br>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>
var mySocket = null;
function openTCP() {
mySocket = new navigator.TCPSocket("www.tsvs.ntpc.edu.tw", 80);
if (mySocket.opened) {
console.log("TCP connection established sucessfully");
mySocket.writeable.write("Hello World");
} else {
console.log("TCP connection established fail");
};
};
function closeTCP() {
mySocket.halfClose();
mySocket.close();
if (mySocket.closed) {
console.log("TCP socket has been cleanly closed");
};
};
</script>
<a class="v001" href="#" >櫻樹 變 櫻花</a>
<br>
<button type="button" onclick="openTCP()">TCP Open</button>
<button type="button" onclick="closeTCP()">TCP Close</button>
2015年11月28日 星期六
javascript socket api
javascript socket api
Mozilla MDN WebSockets
Writing WebSocket client applications
WebSocket in HTML5
SOCKET.IO 1.0 IS HERE
HTML5 WebSocket Security (wss) is Strong
http://stackoverflow.com/questions/12407778/connecting-to-tcp-socket-from-browser-using-javascript
http://www.w3.org/TR/raw-sockets/
W3C WebIDL 中文說明
https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket
whiteout-io/tcp-socket · GitHub
javascript tcp socket:
WebTCP: Making TCP connections from Browser
WebIDL bindings
WebIDL Extended Attribute 大解密
Web IDL interfaces
Web IDL slides
WebIDL 簡介
Re: WebIDL 簡介
小y的小檔案
gasolin的小檔案
愛聞插低的小檔案
Mozilla MDN WebSockets
Writing WebSocket client applications
WebSocket in HTML5
SOCKET.IO 1.0 IS HERE
HTML5 WebSocket Security (wss) is Strong
http://stackoverflow.com/questions/12407778/connecting-to-tcp-socket-from-browser-using-javascript
http://www.w3.org/TR/raw-sockets/
W3C WebIDL 中文說明
https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket
whiteout-io/tcp-socket · GitHub
javascript tcp socket:
WebTCP: Making TCP connections from Browser
WebIDL bindings
WebIDL Extended Attribute 大解密
Web IDL interfaces
Web IDL slides
WebIDL 簡介
Re: WebIDL 簡介
小y的小檔案
gasolin的小檔案
愛聞插低的小檔案
Connecting to TCP Socket from browser using javascript
2012年9月13日 - I have a vb.net application that opens a socket and listens on it. I need ... As for your problem, currently you will have to depend on XHR or ...
Node.js tcp client and server example · GitHub
2015年11月20日 - In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp... http://www. hacksparrow.com/tcp-socket-programming-in-node-js.html.) */.
net Node.js v5.1.0 Manual & Documentation
This object is an abstraction of a TCP or local socket. net. ... or they can be created by Node.js and passed to the user through the 'connection' event of a server.
WebTCP: Making TCP connections from Browser - {cool_title}
2012年11月27日 - There is no simple way to create TCP sockets in Javascript on a browser side. Although solutions like Websockets allow to create something ...
TCP Socket Programming in Node.js - Hack Sparrow
2011年10月26日 - Programming TCP Sockets in Node.js Eager to know how socketsare programmed in Node? There are three variants of sockets in Node - i.
Comet Daily » Blog Archive » Sockets in the Browser
2008年7月1日 - The name of the API is TCPSocket and you can use it like this: .... client in JavaScript that uses TCPSocket and runs in the browser, so you can ...
How to Form a TCP Connection Between a JavaScript ...
2011年10月6日 - How to Form a TCP Connection Between a JavaScript Program and Java ... < head> <title>TCP Socket test</title> <script type="text/javascript" ...
SimpleExample - Google Code
<script type='text/javascript'> // Host we are connecting to var host = 'localhost'; // Port we are connecting on var port = 3000; var socket = new jSocket();
TCPSocket: Sockets in the browser - Ajaxian
2008年7月1日 - javascript. < view plain text >. var conn = new TCPSocket(hostname, port). conn. onopen = function() { alert('connection opened!') } conn.onread ...
訂閱:
文章 (Atom)