xrootd
Loading...
Searching...
No Matches
XrdClAsyncDiscardReader.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// Copyright (c) 2011-2012 by European Organization for Nuclear Research (CERN)
3// Author: Michal Simon <michal.simon@cern.ch>
4//------------------------------------------------------------------------------
5// XRootD is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// XRootD is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
17//------------------------------------------------------------------------------
18
19#ifndef SRC_XRDCL_XRDCLASYNCDISCARDREADER_HH_
20#define SRC_XRDCL_XRDCLASYNCDISCARDREADER_HH_
21
23#include "XrdCl/XrdClSocket.hh"
25#include "XrdCl/XrdClLog.hh"
28
29namespace XrdCl
30{
31
32 //----------------------------------------------------------------------------
34 //----------------------------------------------------------------------------
36 {
37 public:
38 //------------------------------------------------------------------------
43 //------------------------------------------------------------------------
48
49 //------------------------------------------------------------------------
55 //------------------------------------------------------------------------
56 XRootDStatus Read( Socket &socket, uint32_t &btsret )
57 {
58 Log *log = DefaultEnv::GetLog();
59 log->Error( XRootDMsg, "[%s] Handling response to %s: "
60 "DiscardReader: we were not expecting "
61 "raw data.", url.GetHostId().c_str(),
62 request.GetDescription().c_str() );
63 // Just drop the connection, we don't know if the stream is sane anymore.
64 // Recover with a reconnect.
66 }
67
68 //------------------------------------------------------------------------
71 //------------------------------------------------------------------------
73 {
74 response = nullptr;
76 }
77 };
78
79} /* namespace XrdCl */
80
81#endif /* SRC_XRDCL_XRDCLASYNCVECTORREADER_HH_ */
Definition XrdClAnyObject.hh:33
Object for discarding data.
Definition XrdClAsyncDiscardReader.hh:36
XRootDStatus GetResponse(AnyObject *&response)
Definition XrdClAsyncDiscardReader.hh:72
XRootDStatus Read(Socket &socket, uint32_t &btsret)
Definition XrdClAsyncDiscardReader.hh:56
AsyncDiscardReader(const URL &url, const Message &request)
Definition XrdClAsyncDiscardReader.hh:44
Base class for any message's body reader.
Definition XrdClAsyncRawReaderIntfc.hh:35
const Message & request
Definition XrdClAsyncRawReaderIntfc.hh:155
const URL & url
Definition XrdClAsyncRawReaderIntfc.hh:154
static Log * GetLog()
Get default log.
Handle diagnostics.
Definition XrdClLog.hh:101
void Error(uint64_t topic, const char *format,...)
Report an error.
The message representation used throughout the system.
Definition XrdClMessage.hh:30
const std::string & GetDescription() const
Get the description of the message.
Definition XrdClMessage.hh:95
A network socket.
Definition XrdClSocket.hh:43
URL representation.
Definition XrdClURL.hh:31
std::string GetHostId() const
Get the host part of the URL (user:password@host:port)
Definition XrdClURL.hh:94
Request status.
Definition XrdClXRootDResponses.hh:219
Definition XrdClAction.hh:34
const uint16_t stError
An error occurred that could potentially be retried.
Definition XrdClStatus.hh:32
const uint64_t XRootDMsg
Definition XrdClConstants.hh:39
const uint16_t errInvalidResponse
Definition XrdClStatus.hh:99
const uint16_t errCorruptedHeader
Definition XrdClStatus.hh:103