SystemExt.Demo/Network.cs
/// <summary>
/// A demo which implements a basic TCP echo server.
/// </summary>
/// <param name="arg">
/// Command line arguments.
/// </param>
/// <returns>
/// The code to terminate the application with on exit.
/// </returns>
A demo which implements a basic TCP echo server.
A demo which implements a basic TCP echo server .
private static int RunEchoServer(string[] arg)
        {
            var port = (ushort)Prompt.Integer("What port do you want to listen on", 9999, ushort.MinValue, ushort.MaxValue);
            var server = new TCPServer<EchoServerClient>(IPAddress.Any, port);
            Console.WriteLine("Now listening on {0}, press any key to exit.", server.EndPoint);
            Console.ReadKey();
            server.Stop(true);
            return 0;
        }
private static int RunEchoServer ( string [ ] arg ) { var port = ( ushort ) Prompt . Integer ( " " , 9999 , ushort . MinValue , ushort . MaxValue ) ; var server = new TCPServer < EchoServerClient > ( IPAddress . Any , port ) ; Console . WriteLine ( " " , server . EndPoint ) ; Console . ReadKey ( ) ; server . Stop ( true ) ; return 0 ; }
A demo which implements a basic TCP echo server.
A demo which implements a basic TCP echo server .
The code to terminate the application with on exit.
The code to terminate the application with on exit .
arg
string[]
Command line arguments.
Command line arguments .