static void AcceptCallback(IAsyncResult ar) { var stream = (NamedPipeServerStream)ar.AsyncState; stream.EndWaitForConnection(ar); var conn = new PipeConnection(stream); s_callback(conn); NewAccept(); }