xrootd
XrdClientReadV.hh
Go to the documentation of this file.
1#ifndef XRD_CLIENT_READV
2#define XRD_CLIENT_READV
3/******************************************************************************/
4/* */
5/* X r d C l i e n t R e a d V . h h */
6/* */
7/* Author: Fabrizio Furano (INFN Padova, 2006) */
8/* */
9/* This file is part of the XRootD software suite. */
10/* */
11/* XRootD is free software: you can redistribute it and/or modify it under */
12/* the terms of the GNU Lesser General Public License as published by the */
13/* Free Software Foundation, either version 3 of the License, or (at your */
14/* option) any later version. */
15/* */
16/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
17/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
18/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
19/* License for more details. */
20/* */
21/* You should have received a copy of the GNU Lesser General Public License */
22/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
23/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
24/* */
25/* The copyright holder's institutional names and contributor's names may not */
26/* be used to endorse or promote products derived from this software without */
27/* specific prior written permission of the institution or contributor. */
28/******************************************************************************/
29
31// //
32// Helper functions for the vectored read functionality //
33// //
35
36class XrdClientConn;
37#include "XProtocol/XPtypes.hh"
40
44};
45
47public:
48
49 // Builds a request and sends it to the server
50 // If destbuf == 0 the request is sent asynchronously
51 static kXR_int64 ReqReadV(XrdClientConn *xrdc, char *handle, char *destbuf,
53 int firstreq, int nreq, int streamtosend);
54
55 // Picks a readv response and puts the individual chunks into the dest buffer
56 static kXR_int32 UnpackReadVResp(char *destbuf, char *respdata, kXR_int32 respdatalen,
57 readahead_list *buflis, int nbuf);
58
59 // Picks a readv response and puts the individual chunks into the cache
60 static kXR_int32 SubmitToCacheReadVResp(XrdClientConn *xrdc, char *respdata,
61 kXR_int32 respdatalen);
62
64 kXR_int64 offs, kXR_int32 len,
65 kXR_int64 filelen);
66
68 kXR_int64 offs, kXR_int32 len,
69 kXR_int64 filelen,
70 kXR_int32 spltsize);
71};
72#endif
long long kXR_int64
Definition: XPtypes.hh:98
int kXR_int32
Definition: XPtypes.hh:89
Definition: XrdClientConn.hh:54
Definition: XrdClientReadV.hh:46
static void PreProcessChunkRequest(XrdClientVector< XrdClientReadVinfo > &reqvect, kXR_int64 offs, kXR_int32 len, kXR_int64 filelen)
static kXR_int64 ReqReadV(XrdClientConn *xrdc, char *handle, char *destbuf, XrdClientVector< XrdClientReadVinfo > &reqvect, int firstreq, int nreq, int streamtosend)
static kXR_int32 UnpackReadVResp(char *destbuf, char *respdata, kXR_int32 respdatalen, readahead_list *buflis, int nbuf)
static void PreProcessChunkRequest(XrdClientVector< XrdClientReadVinfo > &reqvect, kXR_int64 offs, kXR_int32 len, kXR_int64 filelen, kXR_int32 spltsize)
static kXR_int32 SubmitToCacheReadVResp(XrdClientConn *xrdc, char *respdata, kXR_int32 respdatalen)
Definition: XrdClientVector.hh:49
Definition: XrdClientReadV.hh:41
kXR_int64 offset
Definition: XrdClientReadV.hh:42
kXR_int32 len
Definition: XrdClientReadV.hh:43
Definition: XProtocol.hh:670