mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core, ui, judge: rewrite http & ws layer (#352)
This commit is contained in:
1 parent
3d2384f31a
commit
5af082eac8
37 files changed
+868
-889
No files matched your search
@@ -2,12 +2,12 @@ import { NamedPage } from 'vj/misc/Page';
|
||||
|
||||
const page = new NamedPage('record_detail', async () => {
|
||||
if (!UiContext.socketUrl) return;
|
||||
const [{ default: SockJs }, { DiffDOM }] = await Promise.all([
|
||||
const [{ default: WebSocket }, { DiffDOM }] = await Promise.all([
|
||||
import('../components/socket'),
|
||||
import('diff-dom'),
|
||||
]);
|
||||
|
||||
const sock = new SockJs(UiContext.socketUrl);
|
||||
const sock = new WebSocket(UiContext.socketUrl);
|
||||
const dd = new DiffDOM();
|
||||
sock.onmessage = (message) => {
|
||||
const msg = JSON.parse(message.data);
|
||||
|
||||
Reference in new issue
Block a user