[
https://issues.apache.org/jira/browse/THRIFT-1870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591191#comment-13591191
]
Peace C commented on THRIFT-1870:
---------------------------------
The motivation is to abstract away the platform-specific Thrift code from the
code that uses Thrift. With this patch, both Windows and *NIX simply construct
a pipe transport -
TPipe(MyPipename);
Without the cross-platform approach, each and every application that uses the
transport would need something like this:
#ifdef _WIN32
(set of code to construct a TPipe transport)
...
#else
(set of code to construct a TSocket transport)
...
#endif
This is an unnecessary burden on the calling code and makes it more difficult
to understand and maintain. We use Thrift in a cross-platform Windows / OSX
project and reducing platform-specific #ifdefs in the *calling* code is a
definitive benefit. It's the same reason we choose to use the Boost libraries
instead of sprinkling the code with a bazillion #ifdefs in our application code.
> Enhance TPipe / TPipeServer transport to support both Windows 64-bit and
> cross-platform *NIX support
> ----------------------------------------------------------------------------------------------------
>
> Key: THRIFT-1870
> URL: https://issues.apache.org/jira/browse/THRIFT-1870
> Project: Thrift
> Issue Type: Improvement
> Affects Versions: 0.9
> Environment: Windows, *NIX
> Reporter: Peace C
> Fix For: 0.9
>
> Attachments: TPipe_64bit_xplatform.patch
>
>
> This patch adds support for Windows 64-bit builds by using std::ptrdiff_t to
> represent Windows' pipe HANDLE. It also restores cross-platform *NIX support
> that was broken in THRIFT-1690.
> See contrib/transport-sample for a working cross-platform example of how to
> use TPipe[Server].
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira