mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 19:52:10 +08:00
get ws addr
This commit is contained in:
@@ -64,6 +64,17 @@ class ExampleController extends BaseController {
|
||||
|
||||
self.sendData(uploadRes);
|
||||
}
|
||||
|
||||
async getWsUrl() {
|
||||
const self = this;
|
||||
const { service } = this;
|
||||
const data = {};
|
||||
|
||||
const addr = await service.socket.getWsUrl();
|
||||
data.url = addr;
|
||||
|
||||
self.sendSuccess(data);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ExampleController;
|
||||
|
||||
Reference in New Issue
Block a user