Skip to content

Instantly share code, notes, and snippets.

View alexzhang1030's full-sized avatar
🎯
Focusing

Alex alexzhang1030

🎯
Focusing
View GitHub Profile
@alexzhang1030
alexzhang1030 / webrtc-note-draft.md
Last active June 13, 2024 03:21
WebRTC Note Draft

WebRTC

目前仅存储有关 DataChannel 的信息

通信模型

在进行 WebRTC 通信时,节点间会按照如下顺序获取对方的地址:

  • 如果双端在同一个内网,直接用内网IP通信;
  • 通过 STUN 服务器,为双端构造可以直接访问的地址,打造一条可以穿透 NAT 的通路,俗称“打洞”;
@alexzhang1030
alexzhang1030 / tsup.config.ts
Created June 18, 2024 01:31
Custom bundle vue with treeshake
import { resolve } from 'node:path'
import { defineConfig } from 'tsup'
export default defineConfig({
entryPoints: [
'src/index.ts',
],
noExternal: ['vue'],
clean: true,
format: ['esm', 'cjs'],
@alexzhang1030
alexzhang1030 / new-log.sql
Last active June 26, 2024 10:54
Debug reactivity
--- Currnet:
--- pauseSheduleStack 是在 resetScheduling 中 console.log(pauseScheduleStack)
--- 看样子是因为引起了递归
---pauseScheduleStack--- 0
---pauseScheduleStack--- 0