Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON RPC using TCP, with a separator NULL character #56

Open
sbendt opened this issue Jun 14, 2024 · 3 comments
Open

JSON RPC using TCP, with a separator NULL character #56

sbendt opened this issue Jun 14, 2024 · 3 comments

Comments

@sbendt
Copy link

sbendt commented Jun 14, 2024

I have an implementation, where the communication protocol is based on JSON RPC. The implementation is a little different, since there is a "separator character" (0x00/NULL) between the messages being received and transmitted.

Is it possible to extend the existing JSON RPC TCP implementation to parse/ignore the separator char when receiving and inject it after transmitting messages?

@pocesar
Copy link
Owner

pocesar commented Jun 16, 2024

@sbendt not without a code change. the event emitters (Socket / Net) aren't exposed, so you can't use a Transform stream to pipe the answer, cork the stream until you see a null character, then uncork it.

@sbendt
Copy link
Author

sbendt commented Jun 17, 2024

@pocesar thank you for the prompt reply. Ill consider writing a one-off for this, or maybe fork your repo - if that is okay?

@pocesar
Copy link
Owner

pocesar commented Jun 17, 2024

@sbendt sure, be my guest 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants