go-hep.org/x/hep@v0.38.1/xrootd/xrdproto/ping/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 ping contains the structures describing ping request. 6 // See xrootd protocol specification (http://xrootd.org/doc/dev45/XRdv310.pdf, p. 67) for details. 7 package ping // import "go-hep.org/x/hep/xrootd/xrdproto/ping" 8 9 import ( 10 "go-hep.org/x/hep/xrootd/internal/xrdenc" 11 ) 12 13 // RequestID is the id of the request, it is sent as part of message. 14 // See xrootd protocol specification for details: http://xrootd.org/doc/dev45/XRdv310.pdf, 2.3 Client Request Format. 15 const RequestID uint16 = 3011 16 17 // Request holds ping request parameters. 18 type Request struct { 19 _ [16]byte 20 _ int32 21 } 22 23 // MarshalXrd implements xrdproto.Marshaler. 24 func (o Request) MarshalXrd(wBuffer *xrdenc.WBuffer) error { 25 wBuffer.Next(20) 26 return nil 27 } 28 29 // UnmarshalXrd implements xrdproto.Unmarshaler. 30 func (o *Request) UnmarshalXrd(rBuffer *xrdenc.RBuffer) error { 31 rBuffer.Skip(20) 32 return nil 33 } 34 35 // ReqID implements xrdproto.Request.ReqID. 36 func (req *Request) ReqID() uint16 { return RequestID } 37 38 // ShouldSign implements xrdproto.Request.ShouldSign. 39 func (req *Request) ShouldSign() bool { return false }