go-hep.org/x/hep@v0.38.1/xrootd/ping.go (about) 1 // Copyright ©2018 The go-hep Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package xrootd // import "go-hep.org/x/hep/xrootd" 6 7 import ( 8 "context" 9 10 "go-hep.org/x/hep/xrootd/xrdproto/ping" 11 ) 12 13 // Ping determines whether the server is still alive. 14 func (sess *cliSession) Ping(ctx context.Context) error { 15 _, err := sess.Send(ctx, nil, &ping.Request{}) 16 // TODO: should we react somehow to redirection? 17 return err 18 }