Skip to content
Snippets Groups Projects
Commit b0ed5026 authored by Michael Davis's avatar Michael Davis
Browse files

[ssi_af_ls] Implements data/stream callback

parent ea08b486
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,19 @@ void RequestCallback<cta::xrd::Alert>::operator()(const cta::xrd::Alert &alert)
OutputJsonString(std::cout, &alert);
}
/*!
* Data callback.
*
* Defines how Data/Stream messages should be handled
*/
template<>
void XrdSsiPbRequestType::DataCallback(XrdSsiRequest::PRD_Xeq &post_process, char *response_bufptr, int response_buflen, bool is_last)
{
std::cout.write(response_bufptr, response_buflen);
}
} // namespace XrdSsiPb
......
......@@ -24,9 +24,16 @@
/*!
* Bind the type of the XrdSsiService to the types defined in the .proto file
*/
typedef XrdSsiPb::ServiceClientSide<cta::xrd::Request, //!< XrdSSi Request message type
cta::xrd::Response, //!< XrdSsi Metadata message type
cta::xrd::Alert> //!< XrdSsi Alert message type
XrdSsiPbServiceType;
/*!
* Bind the type of the XrdSsiRequest to the types defined in the .proto file
*/
typedef XrdSsiPb::Request<cta::xrd::Request, //!< XrdSSi Request message type
cta::xrd::Response, //!< XrdSsi Metadata message type
cta::xrd::Alert> //!< XrdSsi Alert message type
XrdSsiPbRequestType;
......@@ -133,7 +133,7 @@ ServiceClientSide<RequestType, MetadataType, AlertType>::~ServiceClientSide()
// implementation simply returns false. i.e. there is no way to know if we are shutting down
// cleanly or not.
std::cout << "[WARNING] ServiceClientSide object was destroyed before shutting down the Service." << std::endl;
std::cerr << "[WARNING] ServiceClientSide object was destroyed before shutting down the Service." << std::endl;
}
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment