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

separate en/de-coder for substreams #13

Open
siddo420 opened this issue Nov 3, 2015 · 4 comments
Open

separate en/de-coder for substreams #13

siddo420 opened this issue Nov 3, 2015 · 4 comments

Comments

@siddo420
Copy link

siddo420 commented Nov 3, 2015

can I use different parsers for separate substeams (and main stream)? If yes, how do I do that?

I have Parser object instantiated on the server side with default JSON parser.

Can I simply use a new substream for binary data?

@lpinca
Copy link
Member

lpinca commented Nov 5, 2015

AFAIK right now it isn't possible. Every substream uses the same parser (the one used by the underlying stream).

@siddo420
Copy link
Author

siddo420 commented Nov 6, 2015

Hows hard would it be to implement this feature? Any tips/tricks/workarounds you could think of?

@lpinca
Copy link
Member

lpinca commented Nov 6, 2015

I don't know, it's not easy and it will probably require structural changes in Primus.

@siddo420
Copy link
Author

siddo420 commented Nov 6, 2015

I guess, I have to use multiple primus instances on server side and client side if I need to use primus for both binary and JSON data transfer. Or, intercept messages?

Can you think of a module that allows binary file transfer using primus? I only found some links for socket.io through Google.

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