[
https://issues.apache.org/jira/browse/THRIFT-1690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497495#comment-13497495
]
Peace C commented on THRIFT-1690:
---------------------------------
>From what I can tell, alot of people rely on domain sockets in
>T[Server]Socket. Consider also that domain sockets are handled very similarly
>to TCP sockets so you'd end up with alot of redundant code from the socket
>transport.
I recommend reverting to the #ifdefs that were originally in the pipe
transports to retain better cross-platform support. Pull out the anonymous pipe
portion and place that into its own class. We'll need to solve how to cleanly
cast HANDLE to/from 32 & 64-bit types since *NIX doesn't have HANDLEs. Could we
typedef a 32/64-bit long to HANDLE on *NIX systems, assuming bitness can be
detected by the preprocessor?
> Sockets and Pipe Handles truncated on Win64
> -------------------------------------------
>
> Key: THRIFT-1690
> URL: https://issues.apache.org/jira/browse/THRIFT-1690
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9
> Environment: 64-bit Windows
> Reporter: Ben Craig
> Assignee: Roger Meier
> Attachments: lib_socket_typedef.patch, libthrift_pipe_size.patch,
> libthrift_warning_purge.patch
>
> Original Estimate: 48h
> Remaining Estimate: 48h
>
> On 64-bit Windows, "int" is a 32-bit value. SOCKET and HANDLE are 64-bit.
> All of the files dealing with sockets in thrift use "int" as the type of a
> socket, as this is the idiomatic way to handle sockets on POSIX systems. For
> portability, a SOCKET typedef is probably needed.
> For the Pipe Server and Pipe Transport, HANDLEs are cast to ints to store as
> member variables for some reason (maybe to avoid #including <windows.h> in a
> header?).
> Both of these situations can result in invalid handles being used (and valid
> handles being leaked) when the system is under load.
--
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