Mck SembWever created THRIFT-1619:
-------------------------------------
Summary: Implement TSocket buffer methods
Key: THRIFT-1619
URL: https://issues.apache.org/jira/browse/THRIFT-1619
Project: Thrift
Issue Type: Improvement
Components: Java - Library
Affects Versions: 0.8
Reporter: Mck SembWever
Priority: Minor
Fix For: 0.9
TSocket buffers its input socket.
Therefore getBuffer(), getBufferPosition(), getBytesRemainingInBuffer(), and
consumeBuffer(..) can be implemented.
Use case:
We use our own multiplexing code, something similar to THRIFT-66.
The server has a default service registered so that if a vanilla
(non-multiplexing) client tries to access the server it still works.
But for it to work the server must rewind the inputTransport (since it called
readMessageBegin() to check for the multiplexing TMessage type).
Currently we've solved it by using reflection to get access to
TIOStreamTransport.inputStream_ but this isn't elegant. With getBuffer()
implemented something more elegant could be provided... (although two new
methods TSocket.mark(int) and TSocket.reset() would be even more elegant
particularly performance-wise).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira