thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King III (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (THRIFT-1619) Implement TSocket buffer methods
Date Thu, 03 Jan 2019 13:21:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-1619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James E. King III updated THRIFT-1619:
--------------------------------------
    Affects 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
>            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)

Mime
View raw message