Fleck
Fleck copied to clipboard
expose listen Socket property in Interface ISocket.
some times, need to get the underlying listen socket for other purpose. as I need to prevent inherit the listen socket when creating subprocess.
[DllImport("kernel32.dll", SetLastError = true)]
static extern bool SetHandleInformation(IntPtr hObject, uint dwMask, uint dwFlags);
private const uint HANDLE_FLAG_INHERIT = 1;
// ...
private static void MakeNotInheritable(Socket tcpListenedSocket)
{
var handle = tcpListenedSocket.Handle;
SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
}
:white_check_mark: Build Fleck 0.0.63-ci completed (commit https://github.com/statianzo/Fleck/commit/403efc3a0b by @wuqiong)
:white_check_mark: Build Fleck 0.0.63-ci completed (commit https://github.com/statianzo/Fleck/commit/403efc3a0b by @wuqiong)
:white_check_mark: Build Fleck 0.0.65-ci completed (commit https://github.com/statianzo/Fleck/commit/d1a6a658ea by @wuqiong)
:white_check_mark: Build Fleck 0.0.65-ci completed (commit https://github.com/statianzo/Fleck/commit/d1a6a658ea by @wuqiong)
:white_check_mark: Build Fleck 0.0.68-ci completed (commit https://github.com/statianzo/Fleck/commit/4d361dab87 by @wuqiong)
:white_check_mark: Build Fleck 0.0.68-ci completed (commit https://github.com/statianzo/Fleck/commit/4d361dab87 by @wuqiong)