文件名称:socket.io-cookie:用于socket.io的Cookie解析器中间件
文件大小:2KB
文件格式:ZIP
更新时间:2024-06-07 12:42:48
JavaScript
socket.io-cookie 用于socket.io的Cookie解析器中间件 例子 var cookieParser = require ( 'socket.io-cookie' ) ; var server = require ( 'http' ) . Server ( ) ; var io = require ( 'socket.io' ) ( server ) ; // after this cookies are parsed io . use ( cookieParser ) ; // use cookies from some middleware io . use ( function ( socket , next ) { console . log ( socket . request . cookies . someCookie ) ; } ) ; //
【文件预览】:
socket.io-cookie-master
----lib()
--------socket.io-cookie.js(218B)
----README.md(590B)
----.gitignore(12B)
----index.js(70B)
----package.json(655B)