Skip to content

Instantly share code, notes, and snippets.

View sichbo's full-sized avatar

Simon Bond sichbo

View GitHub Profile
/*
* Windows Service interop functions courtesy of the brilliant Martin Andreas Ullrich
* https://github.com/dasMulli/dotnet-win32-service - MIT license
* The original code has been reduced for brevity and bare basic functionality.
*/
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
@sichbo
sichbo / UnixTcpListenerBug.cs
Created June 30, 2016 18:50
Unix TcpListener bug
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
using System.Threading;
namespace TcpListenerTest
{