rename all base.xxx to basend-xxx
This commit is contained in:
parent
ab4dfb2db4
commit
c1acfe53fb
@ -1 +1 @@
|
|||||||
# base.websocket.server | web服务端套接口
|
# basend-websocket-server | web 服务端套接口
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
const ws = require('ws')
|
const ws = require('ws')
|
||||||
const webtoken = require('base.webtoken')
|
const webtoken = require('basend-webtoken')
|
||||||
|
|
||||||
const my = {
|
const my = {
|
||||||
wssServer: undefined,
|
wssServer: undefined,
|
||||||
@ -30,7 +30,7 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
if (dataObj.skevent === 'SOCKET_OWNER') {
|
if (dataObj.skevent === 'SOCKET_OWNER') {
|
||||||
dataObj._passtokenSource = webtoken.verifyToken(dataObj._passtoken) // todo: 为防止前端欺骗,应当用和login里类似的方法来检查来检查
|
dataObj._passtokenSource = webtoken.verifyToken(dataObj._passtoken) // todo: 为防止前端欺骗,应当用和login里类似的方法来检查来检查
|
||||||
if (typeof(dataObj._passtokenSource?.uuid)==='string') {
|
if (typeof dataObj._passtokenSource?.uuid === 'string') {
|
||||||
my.socketPool[dataObj._passtokenSource.uuid] = socket
|
my.socketPool[dataObj._passtokenSource.uuid] = socket
|
||||||
console.log('收到Login 成功的消息,绑定socket', Object.keys(my.socketPool))
|
console.log('收到Login 成功的消息,绑定socket', Object.keys(my.socketPool))
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "base.websocket.server",
|
"name": "basend-websocket-server",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"main": "basesocket.js",
|
"main": "basesocket.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"base.webtoken": "git+https://git.faronear.org/npm/base.webtoken",
|
"basend-webtoken": "git+https://git.faronear.org/npm/basend-webtoken",
|
||||||
"ws": "^7.2.1"
|
"ws": "^7.2.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
|
Loading…
Reference in New Issue
Block a user