-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[transport]: first-class streams (#11)
* first-class streams * cleanup * add tests for concurrent requests * use const enum instead of bare consts * [docs]: Add docstrings to everything (#12) * add more docs to control flags
- Loading branch information
Showing
21 changed files
with
737 additions
and
202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
/** | ||
* Codec interface for encoding and decoding objects to and from string buffers. | ||
* Used to prepare messages for use by the transport layer. | ||
*/ | ||
export interface Codec { | ||
/** | ||
* Encodes an object to a string buffer. | ||
* @param obj - The object to encode. | ||
* @returns The encoded string buffer. | ||
*/ | ||
toStringBuf(obj: object): string; | ||
/** | ||
* Decodes an object from a string buffer. | ||
* @param buf - The string buffer to decode. | ||
* @returns The decoded object, or null if decoding failed. | ||
*/ | ||
fromStringBuf(buf: string): object | null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.