コード例 #1
0
		static void Main(string[] args)
		{
			TTransport transport = new TSocket("localhost", 1337);
			TProtocol proto = new TBinaryProtocol(transport);
			TimeService.Client client = new TimeService.Client(proto);

			transport.Open();

			Console.WriteLine(client.GetTime());
			Console.ReadKey();
		}
コード例 #2
0
        static void Main(string[] args)
        {
            TTransport transport = new TSocket("localhost", 1337);
            TProtocol  proto     = new TBinaryProtocol(transport);

            TimeService.Client client = new TimeService.Client(proto);

            transport.Open();
            TimeInfoStruct result = client.GetTime();

            Console.WriteLine(result.ToString());
            Console.ReadKey();
        }