File tree Expand file tree Collapse file tree 5 files changed +55
-0
lines changed
Expand file tree Collapse file tree 5 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ <Solution >
2+ <Folder Name =" /Solution Items/" >
3+ <File Path =" README.md" />
4+ </Folder >
5+ <Folder Name =" /src/" >
6+ <Project Path =" src/CBus/CBus.csproj" />
7+ </Folder >
8+ </Solution >
Original file line number Diff line number Diff line change 1+ # CBus
2+
3+ 来自于 Linux 的 d-Bus 思想
4+
5+ 提供一个中间平台层,可以给多个应用与服务之间建立联系
6+
7+ 设计上全采用 HTTP 1.1 的结构,包括 Header 头和 Body 内容。其中 Header 头为 Key-Value 对。而 Body 则不加以限制,允许传入表单等格式的内容,甚至直接二进制内容返回
8+
9+ ## 连接方式
10+
11+ CBus 支持两种连接方式:
12+
13+ - HTTP: 标准 HTTP 用法。内置证书,支持 HTTPS 方式连接
14+ - Pipe: 本机 IPC 常用的管道。管道传输内容为 HTTP 1.1 的数据格式
15+
16+ 细节设计如下:
17+
18+ 内置约定 3323 为通讯端口,会在启动时在本机文件夹和注册表(仅 Windows 平台) 写入监听的端口号,供其他应用查询使用
19+
20+ ## 通讯细节
21+
22+ 服务 <===> CBus <===> 客户端
23+
24+ ### 面向服务
25+
26+ 服务启动的时候,先向 CBus 执行注册。注册动作为在指定文件夹写入此服务的配置文件
Original file line number Diff line number Diff line change 1+ <Project Sdk =" Microsoft.NET.Sdk" >
2+
3+ <PropertyGroup >
4+ <TargetFramework >net10.0</TargetFramework >
5+ <ImplicitUsings >enable</ImplicitUsings >
6+ <Nullable >enable</Nullable >
7+ </PropertyGroup >
8+
9+ </Project >
Original file line number Diff line number Diff line change 1+ namespace CBus ;
2+
3+ public class HttpConnector
4+ {
5+
6+ }
Original file line number Diff line number Diff line change 1+ namespace CBus ;
2+
3+ public class PipeConnector
4+ {
5+
6+ }
You can’t perform that action at this time.
0 commit comments