示例#1
0
文件: util.go 项目: tstranex/carpcomm
func StationTNCStart(
	mux_client *rpc.Client, station_id string,
	api_server string,
	satellite_id string) error {

	host, port, err := util.SplitHostAndPort(api_server)
	if err != nil {
		return err
	}

	params := url.Values{}
	params.Add("api_host", host)
	params.Add("api_port", port)
	params.Add("satellite_id", satellite_id)

	return CallStationAndCheckStatus(
		mux_client, station_id, stationTNCStart, params)
}
示例#2
0
func GetAPIServer() (string, string) {
	host, port, _ := util.SplitHostAndPort(*api_server_address)
	return host, port
}