socket参数

This commit is contained in:
COOL 2022-04-15 09:17:06 +08:00
parent 790d2db01f
commit f5cd911b70

View File

@ -16,6 +16,7 @@ export class HelloController {
@OnWSConnection()
async onConnectionMethod() {
console.log('on client connect', this.ctx.id);
console.log('参数', this.ctx.handshake.query);
this.ctx.emit('data', '连接成功');
}