static int Main(string[] args)
        {
            string serverCertificateName = "C:\\Users\\name\\public.pem";
            string machineName           = "localhost";

            // User can specify the machine name and server name.
            // Server name must match the name on the server's certificate.

            SslTcpClient.RunClient(machineName, serverCertificateName);
            Console.ReadLine();
            return(0);
        }
예제 #2
0
        public static int Main(string[] args)
        {
            string serverCertificateName = null;
            string machineName           = null;

            if (args == null || args.Length < 1)
            {
                DisplayUsage();
            }
            // User can specify the machine name and server name.
            // Server name must match the name on the server's certificate.
            machineName = args[0];
            if (args.Length < 2)
            {
                serverCertificateName = machineName;
            }
            else
            {
                serverCertificateName = args[1];
            }
            SslTcpClient.RunClient(machineName, serverCertificateName);
            return(0);
        }