feat(protocol): add name to TransportProtocol

This commit is contained in:
Szymon Lesisz
2024-08-07 16:33:25 +02:00
committed by martin
parent 609f6a6db6
commit 5bf4c0138e
3 changed files with 3 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
export * from './decode';
export * from './encode';
export const name = 'bridge';

View File

@@ -1,2 +1,3 @@
export * from './decode';
export * from './encode';
export const name = 'v1';

View File

@@ -14,6 +14,7 @@ export type TransportProtocolEncode = (
) => Buffer;
export interface TransportProtocol {
name: 'bridge' | 'v1';
encode: TransportProtocolEncode;
decode: TransportProtocolDecode;
getChunkHeader: (data: Buffer) => Buffer;