示例#1
0
func (self *DataRPCClient) Connect() error {
	var err error
	self.lock.Lock()
	defer self.lock.Unlock()
	if self.conn == nil {
		self.conn, err = rpc.DialHTTP("tcp", config.DataServerAddr(self.index))
	}
	return err
}
示例#2
0
文件: data.go 项目: proj-223/CatFs
func (self *DataServer) addr() string {
	return config.DataServerAddr(int(self.location))
}