Skip to content

Commit

Permalink
chore: update.
Browse files Browse the repository at this point in the history
  • Loading branch information
radiorz committed Aug 1, 2024
1 parent 6c95f35 commit 5ec37ec
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/requestable/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# requestable

在普通的emitter上包装一层,以支持类似http的请求响应模式

实际工作中经常会用到单向触发的api

- tcp
- mqtt
- mqtt
- window.parent.postMessage window.addEventListener('message',onMessage)
有时我们想要等待一个请求产生的结果,那么只需要使用 Requestable 包裹一下客户端,Responsive 包装一下服务端,即可使用请求响应的模式。

有时我们想要等待一个请求产生的结果,那么只需要使用 Requestable 包裹一下客户端,Responsive 包装一下服务端,即可使用请求响应的模式。

## 使用

Expand Down Expand Up @@ -55,3 +57,11 @@ async function bootstrap() {
bootstrap();

```

## 未完待续

server -> like express

route -> wildcard support

// 或者 like trpc server 即 client(类型提醒,直接执行方法)

0 comments on commit 5ec37ec

Please sign in to comment.