From: mame@... Date: 2017-10-20T01:24:31+00:00 Subject: [ruby-core:83408] [Ruby trunk Feature#1644] recv on inherited socket wrapped in TCPSocket does not read data, on Windows Issue #1644 has been updated by mame (Yusuke Endoh). Usa-san, do you still have a plan to imprement this? ---------------------------------------- Feature #1644: recv on inherited socket wrapped in TCPSocket does not read data, on Windows https://bugs.ruby-lang.org/issues/1644#change-67373 * Author: kntuaf (Kedar H) * Status: Assigned * Priority: Normal * Assignee: usa (Usaku NAKAMURA) * Target version: Next Major ---------------------------------------- =begin On Windows, if you try to wrap an existing winsock socket that was inherited from a parent process into a TCPSocket, any calls to recv on this socket in the child process will not retrieve any data. This is because the inherited socket is not a member of the internal "socklist" structure in win32.c. rb_w32_select filters out all sockets that are not in this internal list, prior to calling ws2_32!select. One good solution is for TCPSocket.for_fd to make sure to insert its argument into the socklist structure so that subsequent Winsock functions wrapped by Ruby will work as though the socket were created by this Ruby process. Another possible solution is to expose another method, something like TCPSocket.from_new_fd. =end -- https://bugs.ruby-lang.org/ Unsubscribe: