net-component
TypeScript icon, indicating that this package has built-in type declarations

1.2.18 • Public • Published

net-component

在 application 的基础上, 规范了不同种类消息的转发与路由的规则. 其中 RpcCaller 与 RpcHandler 主要处理服务之前的访问, 而 HttpCaller 与 HttpHandler 主要处理用户与服务的访问.

HttpCaller 只用于http服务将用户请求转发给其他服务.

RpcCallerComponent

序列化请求, 并传给对应服务, 接到回复后, 反序列化回复并返回.

RpcHandlerComponent

处理请求上下文, 反序列化请求, 并检测参数的规范性, 路由给对应函数处理, 序列化函数返回值并回复.

HttpCallerComponent

序列化请求与用户信息, 并传给对应服务, 接到回复后, 反序列化回复并返回.

HttpHandlerComponent

处理请求上下文, 反序列化请求与用户信息, 并检测参数的规范性, 路由给对应函数处理, 序列化函数返回值并回复.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.18
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.18
    1

Package Sidebar

Install

npm i net-component

Weekly Downloads

1

Version

1.2.18

License

ISC

Unpacked Size

31.2 kB

Total Files

44

Last publish

Collaborators

  • chengaoyuan