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

C++ client doesn't support OCAP and OOB console/stdio is only available in OCAP mode #70

Open
JanWielemaker opened this issue Aug 17, 2016 · 1 comment

Comments

@JanWielemaker
Copy link

I'm trying to capture R console I/O using OOB. I've extended the C++ client do handle OOB_SEND. That works for self.oobSend(). Using the config below, I do not get OOB messages:

oob enable
forward.stdio enable
console.oob enable
console.input disable

A bit if searching indicates that Rserve_OCAP_connected() sets up the console, but is not called unless SRV_QAP_OC is set. So, I added qap.oc to the config file, but now the C++ client no longer connects
(error code -3).

Does qap.oc select a different protocol? Is setting up the console deliberately disabled in the default protocol setting? If is is not deliberately disabled I'll have a look how to enable it.

I'm using Rserve compiled from the current git version.

@s-u
Copy link
Owner

s-u commented Mar 8, 2018

In OCap mode, technically, the protocol is the same (QAP1), but the handshake is different, because instead of the ID string the server sends the result of oc.init() after connecting thus providing the initial capabilities. So to support OCaps the connect piece of the C++ client would have to be changed to handle that.

Because QAP clients typically don't know how to handle OOB (since it was not defined in the protocol) and it would interfere with the result response, we only use OOB in OCap mode. OCap mode is much safer, because it doesn't allow arbitrary execution.

@s-u s-u changed the title OOB console/stdio C++ client doesn't support OCAP and OOB console/stdio is only available in OCAP mode Mar 8, 2018
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