文件名称:astro-spacesocket-a5dead8
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:13.77kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
WebSockets From Space*
* There are no users in space, only astronauts with the latest browser. Therefore no graceful fallback is attempted.
API
Setup
var server = http.createServer(...)
server.listen(port)
require( spacesocket ).attach(server, function(conn) {
dealWithWebSocket(conn)
})
Reading
conn.on( data , function(msg) {
doStuffWithString(msg)
})
Writing
conn.write( Hello, World )
Closure
conn.end()
Buffer control
conn.on( drain , function() {
// socket write queue is empty,
// send until queueing again:
while(conn.send(data)) { }
})
// Throttle sender for 1s:
conn.pause()
setTimeout(function() { conn.resume() }, 1000)
-WebSockets From Space*
* There are no users in space, only astronauts with the latest browser. Therefore no graceful fallback is attempted.
API
Setup
var server = http.createServer(...)
server.listen(port)
require( spacesocket ).attach(server, function(conn) {
dealWithWebSocket(conn)
})
Reading
conn.on( data , function(msg) {
doStuffWithString(msg)
})
Writing
conn.write( Hello, World )
Closure
conn.end()
Buffer control
conn.on( drain , function() {
// socket write queue is empty,
// send until queueing again:
while(conn.send(data)) { }
})
// Throttle sender for 1s:
conn.pause()
setTimeout(function() { conn.resume() }, 1000)
* There are no users in space, only astronauts with the latest browser. Therefore no graceful fallback is attempted.
API
Setup
var server = http.createServer(...)
server.listen(port)
require( spacesocket ).attach(server, function(conn) {
dealWithWebSocket(conn)
})
Reading
conn.on( data , function(msg) {
doStuffWithString(msg)
})
Writing
conn.write( Hello, World )
Closure
conn.end()
Buffer control
conn.on( drain , function() {
// socket write queue is empty,
// send until queueing again:
while(conn.send(data)) { }
})
// Throttle sender for 1s:
conn.pause()
setTimeout(function() { conn.resume() }, 1000)
-WebSockets From Space*
* There are no users in space, only astronauts with the latest browser. Therefore no graceful fallback is attempted.
API
Setup
var server = http.createServer(...)
server.listen(port)
require( spacesocket ).attach(server, function(conn) {
dealWithWebSocket(conn)
})
Reading
conn.on( data , function(msg) {
doStuffWithString(msg)
})
Writing
conn.write( Hello, World )
Closure
conn.end()
Buffer control
conn.on( drain , function() {
// socket write queue is empty,
// send until queueing again:
while(conn.send(data)) { }
})
// Throttle sender for 1s:
conn.pause()
setTimeout(function() { conn.resume() }, 1000)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
astro-spacesocket-a5dead8/
astro-spacesocket-a5dead8/LICENSE
astro-spacesocket-a5dead8/README.md
astro-spacesocket-a5dead8/lib/
astro-spacesocket-a5dead8/lib/connection.js
astro-spacesocket-a5dead8/lib/framing.js
astro-spacesocket-a5dead8/lib/oldFraming.js
astro-spacesocket-a5dead8/lib/spacesocket.js
astro-spacesocket-a5dead8/speedtest/
astro-spacesocket-a5dead8/speedtest/client.js
astro-spacesocket-a5dead8/speedtest/graph.js
astro-spacesocket-a5dead8/speedtest/index.html
astro-spacesocket-a5dead8/speedtest/server.js
astro-spacesocket-a5dead8/test/
astro-spacesocket-a5dead8/test/framing.test.js
astro-spacesocket-a5dead8/test/oldFraming.test.js
astro-spacesocket-a5dead8/test/spacesocket.test.js
astro-spacesocket-a5dead8/LICENSE
astro-spacesocket-a5dead8/README.md
astro-spacesocket-a5dead8/lib/
astro-spacesocket-a5dead8/lib/connection.js
astro-spacesocket-a5dead8/lib/framing.js
astro-spacesocket-a5dead8/lib/oldFraming.js
astro-spacesocket-a5dead8/lib/spacesocket.js
astro-spacesocket-a5dead8/speedtest/
astro-spacesocket-a5dead8/speedtest/client.js
astro-spacesocket-a5dead8/speedtest/graph.js
astro-spacesocket-a5dead8/speedtest/index.html
astro-spacesocket-a5dead8/speedtest/server.js
astro-spacesocket-a5dead8/test/
astro-spacesocket-a5dead8/test/framing.test.js
astro-spacesocket-a5dead8/test/oldFraming.test.js
astro-spacesocket-a5dead8/test/spacesocket.test.js
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.