http://stackoverflow.com/questions/6965107/converting-between-strings-and-arraybuffers
https://developers.google.com/web/updates/2012/06/How-to-convert-ArrayBuffer-to-and-from-String
2015年12月31日 星期四
2015年12月17日 星期四
2015年12月9日 星期三
PC Control Codes
Function Code Data
POWER ON 02H 00H 00H 00H 00H 02H
POWER OFF 02H 01H 00H 00H 00H 03H
INPUT SELECT COMPUTER 1 02H 03H 00H 00H 02H 01H 01H 09H
INPUT SELECT COMPUTER 2 (Digital) 02H 03H 00H 00H 02H 01H 1AH 22H
INPUT SELECT COMPUTER 2 (Analog) 02H 03H 00H 00H 02H 01H 02H 0AH
INPUT SELECT VIDEO 02H 03H 00H 00H 02H 01H 06H 0EH
INPUT SELECT S-VIDEO 02H 03H 00H 00H 02H 01H 0BH 13H
PICTURE MUTE ON 02H 10H 00H 00H 00H 12H
PICTURE MUTE OFF 02H 11H 00H 00H 00H 13H
SOUND MUTE ON 02H 12H 00H 00H 00H 14H
SOUND MUTE OFF 02H 13H 00H 00H 00H 15H
POWER ON 02H 00H 00H 00H 00H 02H
POWER OFF 02H 01H 00H 00H 00H 03H
INPUT SELECT COMPUTER 1 02H 03H 00H 00H 02H 01H 01H 09H
INPUT SELECT COMPUTER 2 (Digital) 02H 03H 00H 00H 02H 01H 1AH 22H
INPUT SELECT COMPUTER 2 (Analog) 02H 03H 00H 00H 02H 01H 02H 0AH
INPUT SELECT VIDEO 02H 03H 00H 00H 02H 01H 06H 0EH
INPUT SELECT S-VIDEO 02H 03H 00H 00H 02H 01H 0BH 13H
PICTURE MUTE ON 02H 10H 00H 00H 00H 12H
PICTURE MUTE OFF 02H 11H 00H 00H 00H 13H
SOUND MUTE ON 02H 12H 00H 00H 00H 14H
SOUND MUTE OFF 02H 13H 00H 00H 00H 15H
2015年12月3日 星期四
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 ...
2015年11月1日 星期日
2015年10月31日 星期六
訂閱:
文章 (Atom)