package backend func Start() { // addr := net.JoinHostPort("localhost", "9090") // handler := NewGameServiceHandler() // //创建处理器 // processor := backend.NewGameAdminServiceProcessor(handler) // transportFactory := thrift.NewTBufferedTransportFactory(8192) // protocolFactory := thrift.NewTBinaryProtocolFactoryConf(&thrift.TConfiguration{}) // tcpAddr, err := net.ResolveTCPAddr("tcp", addr) // if err != nil { // fmt.Printf("Failed to resolve address %s: %v\n", addr, err) // return // } // serverTransport := thrift.NewTServerSocketFromAddrTimeout(tcpAddr, 0) // server := thrift.NewTSimpleServer4(processor, serverTransport, transportFactory, protocolFactory) // fmt.Printf("Starting the server on %s...\n", addr) // if err := server.Serve(); err != nil { // fmt.Printf("Error starting the server: %v\n", err) // } }