//console.info({ _at: new Date().toJSON(), _from: 'Socket:initSocket', _type: 'CLOG', about: 'Base Socket Server is initialized.' }, '\n,')
//globalThis.wo?.ccinfo?.({ _from: 'Socket:initSocket', _type: 'CLOG', about: 'Base Socket Server is initialized.' })
my.wsServer.on('connection',(socket,req)=>{
my.wsServer.on('connection',(socket,req)=>{
console.info(
globalThis.wo?.ccinfo?.({
{
_at:newDate().toJSON(),
_from:'basesocket:onConnection',
_from:'basesocket:onConnection',
_type:'CLOG',
_type:'CLOG',
about:`A socket is connecting from ${req.connection.remoteAddress}:${req.connection.remotePort}.`,
about:`A socket is connecting from ${req.connection.remoteAddress}:${req.connection.remotePort}.`,
},
})
'\n,'
)
// socket.isAlive = true
// socket.isAlive = true
// socket.on('ping', () => { socket.isAlive = true }) // Most WebSocket server implementations, including the ws library, automatically respond to ping frames with pong frames. However, the server can listen for ping events using socket.on('ping', ...) if it wants to perform additional actions.
// socket.on('ping', () => { socket.isAlive = true }) // Most WebSocket server implementations, including the ws library, automatically respond to ping frames with pong frames. However, the server can listen for ping events using socket.on('ping', ...) if it wants to perform additional actions.
console.log({_at:newDate().toJSON(),_from:'basesocket:onClose',_type:'CLOG',usid:socket?.usid,commid:socket?.commid,skid:socket?.skid},'\n,')// don't know why, but this output happens too often without usid.
globalThis.wo?.cclog?.({_from:'basesocket:onClose',_type:'CLOG',usid:socket?.usid,commid:socket?.commid,skid:socket?.skid})// don't know why, but this output happens too often without usid.
## everything 'git pull or fetch' will update `.git/FETCH_HEAD`, even if the content doesn't change. To avoid too many useless updates of this file in Seafile history:
FETCH_HEAD
*/FETCH_HEAD
.Trash/
.DS_Store
.DS_Store
*/.DS_Store
*/.DS_Store
@@ -48,12 +54,18 @@ _desktop.ini
node_modules/
node_modules/
*/node_modules/
*/node_modules/
package-lock.json
package-lock.json
*/package-lock.json
pages4loader.json5
pages4loader.json5
*/pages4loader.json5
.deploy_git/
.deploy_git/
*/.deploy_git/
*/.deploy_git/
# next.js 项目
.next/
*/.next/
# HBuilder 目录
# HBuilder 目录
unpackage/
unpackage/
*/unpackage/
*/unpackage/
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.