using Thrift.Protocol; using Thrift.Transport; internal class Program { private static void Main(string[] args) { Console.WriteLine("Hello, Client!"); SendTest("List1"); } public static void SendTest(string Message) { try { TTransport transport = new TSocket("localhost", 9091); transport.Open(); TProtocol protocol = new TBinaryProtocol(transport); WcsThrift.Client client = new WcsThrift.Client(protocol); //Console.WriteLine(client.hello("Sunzy")); Console.WriteLine(client.SendCar(new List() { Message }, "P1001", "10")); Console.ReadLine(); } catch (Exception ex) { // 处理异常 Console.WriteLine($"Error: {ex.Message}"); } } }