[
https://issues.apache.org/jira/browse/THRIFT-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James E. King III updated THRIFT-1619:
--------------------------------------
Fix Version/s: (was: 1.0)
> 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: 1.0
> Reporter: mck
> Priority: Minor
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)