예제 #1
0
func main() {
	defer func() {
		if x := recover(); x != nil {
			ERR("caught panic in main()", x)
		}
	}()

	// 获取监听端口
	getPort()

	//启动
	global.Startup(global.ServerName, "transfer_log", nil)

	//开启TransferServer
	err := transferProxy.InitServer(transfer_port)
	checkError(err)

	//保持进程
	global.Run()
}
예제 #2
0
func main() {
	defer func() {
		if x := recover(); x != nil {
			ERR("caught panic in main()", x)
		}
	}()

	// 获取端口号
	getPort()

	//启动
	global.Startup(global.ServerName, "gateway_log", nil)

	//开启TransferServer,由GateServer充当中转服务器
	err := transferProxy.InitServer(transfer_port)
	checkError(err)
	INFO("Starting TransferServer")

	//开启GateServer监听
	startGateway()

	//保持进程
	global.Run()
}