Protocol specification
- Dominant language
- Shell
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Here is a combination of [new JSTP packet format](https://gist.github.com/belochub/4f893611297f37215e3abc473ac76b0d) and yesterdays cccp binary proposals. @metarhia/jstp-core
### Chunk
| Length | Description | Value |
|---|---|---|
| 2 octet | Chunk length (including headers) | > 3, < 64 Kb |
| 2 octet | Stream id | |
| 1 octet | Message type | `H,h,E,C,c,I,i,P,p,S,s` |
| 1 octet | Message encoding | binary, jstp, json... |
| 1 octet | Message compression | raw, gzip |
| 1 octet | Message encryption | reserved |
| `...,` | Headers (comma-terminated) | |
| | Payload | |
### Message type
| Message type | Description | Value |
|---|---|---|
| H | handshake request | 72 |
| h | handshake response | 104 |
| E | event | 69 |
| C | call | 67 |
| c | callback | 99 |
| I | inspect request | 73 |
| i | inspect response | 105 |
| P | ping | 80 |
| p | pong | 112 |
| S | binary stream start | 83 |
| s | binary stream more | 115 |
### Handshake request
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| `...,` | appName | |
| `...,` | version | |
| `...,` | strategy | |
| | Payload | |
### Handshake response
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| | Payload | |
### Event
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| `...,` | interfaceName | |
| `...,` | eventName | |
| | Payload | |
### Call
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| `...,` | interfaceName | |
| `...,` | methodName | |
| | Payload | |
### Callback
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| | Payload | |
### Inspect request
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| `...,` | interfaceName | |
| | Payload | |
### Inspect response
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| | Payload | |
### Ping and Pong
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
### Binary stream start
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| `...,` | Stream length | |
| | Payload | |
### Binary stream more
| Length | Description | Value |
|---|---|---|
| 8 octet | Chunk headers | |
| | Payload | |
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked JSTP packet-format proposal and the @metarhia/jstp-core reference, then compare them with the chunk and message tables in this issue. Done means reaching an agreed protocol specification and identifying the implementation and validation work required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100