packagemainimport("flag""net""net/http""net/rpc""strconv""github.com/PaddlePaddle/Paddle/paddle/go/pserver")funcmain(){port:=flag.Int("p",0,"port of the pserver")flag.Parse()s:=pserver.NewService()err:=rpc.Register(s)iferr!=nil{panic(err)}rpc.HandleHTTP()l,err:=net.Listen("tcp",":"+strconv.Itoa(*port))iferr!=nil{panic(err)}err=http.Serve(l,nil)iferr!=nil{panic(err)}}