xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdClient
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
36
class
XrdClientConn
;
37
#include "
XProtocol/XPtypes.hh
"
38
#include "
XProtocol/XProtocol.hh
"
39
#include "
XrdClient/XrdClientVector.hh
"
40
41
struct
XrdClientReadVinfo
{
42
kXR_int64
offset
;
43
kXR_int32
len
;
44
};
45
46
class
XrdClientReadV
{
47
public
:
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,
52
XrdClientVector<XrdClientReadVinfo>
&reqvect,
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
63
static
void
PreProcessChunkRequest
(
XrdClientVector<XrdClientReadVinfo>
&reqvect,
64
kXR_int64
offs,
kXR_int32
len,
65
kXR_int64
filelen);
66
67
static
void
PreProcessChunkRequest
(
XrdClientVector<XrdClientReadVinfo>
&reqvect,
68
kXR_int64
offs,
kXR_int32
len,
69
kXR_int64
filelen,
70
kXR_int32
spltsize);
71
};
72
#endif
Generated by
1.8.3.1