thrift-dev mailing list archives

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


James E. King III updated THRIFT-1619:
    Affects Version/s:     (was: 1.0)

> Implement TSocket buffer methods
> --------------------------------
>                 Key: THRIFT-1619
>                 URL:
>             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

View raw message