XrdClientReadV.hh

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////
00002 //                                                                      //
00003 // XrdClientReadV                                                       //
00004 //                                                                      //
00005 // Author: Fabrizio Furano (INFN Padova, 2006)                          //
00006 //                                                                      //
00007 // Helper functions for the vectored read functionality                 //
00008 //                                                                      //
00009 //////////////////////////////////////////////////////////////////////////
00010 
00011 //         $Id: XrdClientReadV.hh 30949 2009-11-02 16:37:58Z ganis $
00012 
00013 
00014 
00015 #ifndef XRD_CLIENT_READV
00016 #define XRD_CLIENT_READV
00017 
00018 class XrdClientConn;
00019 #include "XProtocol/XPtypes.hh"
00020 #include "XProtocol/XProtocol.hh"
00021 #include "XrdClient/XrdClientVector.hh"
00022 
00023 struct XrdClientReadVinfo {
00024   kXR_int64 offset;
00025   kXR_int32 len;
00026 };
00027 
00028 class XrdClientReadV {
00029 public:
00030   
00031   // Builds a request and sends it to the server
00032     // If destbuf == 0 the request is sent asynchronously
00033   static kXR_int64 ReqReadV(XrdClientConn *xrdc, char *handle, char *destbuf,
00034                             XrdClientVector<XrdClientReadVinfo> &reqvect,
00035                             int firstreq, int nreq, int streamtosend);
00036   
00037   // Picks a readv response and puts the individual chunks into the dest buffer
00038   static kXR_int32 UnpackReadVResp(char *destbuf, char *respdata, kXR_int32 respdatalen,
00039                                    readahead_list *buflis, int nbuf);
00040   
00041   // Picks a readv response and puts the individual chunks into the cache
00042   static kXR_int32 SubmitToCacheReadVResp(XrdClientConn *xrdc, char *respdata,
00043                                             kXR_int32 respdatalen);
00044   
00045   static void PreProcessChunkRequest(XrdClientVector<XrdClientReadVinfo> &reqvect,
00046                                      kXR_int64 offs, kXR_int32 len,
00047                                      kXR_int64 filelen);
00048                                      
00049   static void PreProcessChunkRequest(XrdClientVector<XrdClientReadVinfo> &reqvect,
00050                                      kXR_int64 offs, kXR_int32 len,
00051                                      kXR_int64 filelen,
00052                                      kXR_int32 spltsize);
00053 
00054 
00055 };
00056 
00057 
00058 
00059 
00060 
00061 #endif

Generated on Tue Jul 5 14:46:18 2011 for ROOT_528-00b_version by  doxygen 1.5.1