-
Notifications
You must be signed in to change notification settings - Fork 148
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
Add option to Skip Headers in StreamMessage(Producer/Consumer) #189
Comments
Same here, currently we are using a workaround and adding the headers manually, but it's far from ideal. |
Skipping headers in StreamMessageProducer / StreamMessageConsumer doesn't make any sense because then you don't know when a message ends in the byte stream. For your use case, you would need specialized implementations of MessageProducer / MessageConsumer that handle messages as individual Strings instead of reading / writing byte streams. The current Launcher API doesn't support that, but you're free to wire up such a thing yourself, just have a look at the code of Launcher.Builder. |
yes. but basically everyone who uses websockets has to do that. so why to do it 100 times if it can be done once |
See PR #211 - it is @juliandolby starting point of websocket support for LSP4J. |
While implementing #314 I realized that there's no use in such an option to skip headers, since that reduces the message consumer / producer to simply invoking the MessageJsonHandler. |
It would be nice to have an option to skip Headers in StreamMessage(Producer/Consumer) to be able to directly talk to a client using https://github.com/TypeFox/vscode-ws-jsonrpc (e.g. https://github.com/TypeFox/monaco-languageclient)
in the current state this wont work cause the client does not produce/expect the headers sent via the protocol
see TypeFox/vscode-ws-jsonrpc#6
The text was updated successfully, but these errors were encountered: