CSharpServer icon indicating copy to clipboard operation
CSharpServer copied to clipboard

Service cannot stop

Open enjoywithme opened this issue 3 years ago • 0 comments

Followed the udp echo server example, code get stuck at service.stop(): var service = new Service();

        // Start the service
        Console.Write("Service starting...");
        service.Start();
        Console.WriteLine("Done!");

        // Create a new UDP echo server
        var server = new EchoServer(service, port, InternetProtocol.IPv4);

        // Start the server
        Console.Write("Server starting...");
        server.Start();
        Console.WriteLine("Done!");

// Stop the server Console.Write("Server stopping..."); server.Stop(); Console.WriteLine("Done!");

        // Stop the service
        Console.Write("Service stopping...");
        service.Stop();
        Console.WriteLine("Done!");

Just start the server and service, no client connection established yet.

enjoywithme avatar Jun 05 '21 08:06 enjoywithme