Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #737 from bbockelm/xrootd-tpc-renew-v2
HTTP TPC v2
- Loading branch information
Showing
24 changed files
with
2,229 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
#include "XrdVersion.hh" | ||
|
||
#include "XrdHttpProtocol.hh" | ||
|
||
/******************************************************************************/ | ||
/* P r o t o c o l L o a d e r */ | ||
/* X r d g e t P r o t o c o l */ | ||
/******************************************************************************/ | ||
|
||
// This protocol can live in a module. The interface below is used by | ||
// the protocol driver to obtain a copy of the protocol object that can be used | ||
// to decide whether or not a link is talking a particular protocol. | ||
// | ||
XrdVERSIONINFO(XrdgetProtocol, xrdhttp); | ||
|
||
extern "C" { | ||
|
||
XrdProtocol *XrdgetProtocol(const char *pname, char *parms, | ||
XrdProtocol_Config *pi) { | ||
XrdProtocol *pp = 0; | ||
const char *txt = "completed."; | ||
|
||
// Put up the banner | ||
// | ||
pi->eDest->Say("Copr. 2012 CERN IT, an HTTP implementation for the XROOTD framework."); | ||
pi->eDest->Say("++++++ HTTP protocol initialization started."); | ||
|
||
// Return the protocol object to be used if static init succeeds | ||
// | ||
if (XrdHttpProtocol::Configure(parms, pi)) | ||
pp = (XrdProtocol *)new XrdHttpProtocol(false); | ||
else txt = "failed."; | ||
pi->eDest->Say("------ HTTP protocol initialization ", txt); | ||
return pp; | ||
} | ||
} | ||
|
||
|
||
/******************************************************************************/ | ||
/* */ | ||
/* P r o t o c o l P o r t D e t e r m i n a t i o n */ | ||
/* X r d g e t P r o t o c o l P o r t */ | ||
/******************************************************************************/ | ||
|
||
// This function is called early on to determine the port we need to use. The | ||
// default is ostensibly 1094 but can be overidden; which we allow. | ||
// | ||
XrdVERSIONINFO(XrdgetProtocolPort, xrdhttp); | ||
|
||
extern "C" { | ||
|
||
int XrdgetProtocolPort(const char *pname, char *parms, XrdProtocol_Config *pi) { | ||
|
||
// Figure out what port number we should return. In practice only one port | ||
// number is allowed. However, we could potentially have a clustered port | ||
// and several unclustered ports. So, we let this practicality slide. | ||
// | ||
if (pi->Port < 0) return 1094; | ||
return pi->Port; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
include( XRootDCommon ) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Modules | ||
#------------------------------------------------------------------------------- | ||
set( LIB_XRD_TPC XrdHttpTPC-${PLUGIN_VERSION} ) | ||
|
||
#------------------------------------------------------------------------------- | ||
# Shared library version | ||
#------------------------------------------------------------------------------- | ||
|
||
if( BUILD_TPC ) | ||
#----------------------------------------------------------------------------- | ||
# The XrdHttp library | ||
#----------------------------------------------------------------------------- | ||
include_directories( ${CURL_INCLUDE_DIRS} ) | ||
|
||
add_library( | ||
${LIB_XRD_TPC} | ||
MODULE | ||
XrdTpc/XrdTpcConfigure.cc | ||
XrdTpc/XrdTpcMultistream.cc | ||
XrdTpc/XrdTpcCurlMulti.cc XrdTpc/XrdTpcCurlMulti.hh | ||
XrdTpc/XrdTpcState.cc XrdTpc/XrdTpcState.hh | ||
XrdTpc/XrdTpcStream.cc XrdTpc/XrdTpcStream.hh | ||
XrdTpc/XrdTpcTPC.cc XrdTpc/XrdTpcTPC.hh) | ||
|
||
target_link_libraries( | ||
${LIB_XRD_TPC} | ||
XrdServer | ||
XrdUtils | ||
XrdHttpUtils | ||
dl | ||
pthread | ||
${CURL_LIBRARIES} ) | ||
|
||
set_target_properties( | ||
${LIB_XRD_TPC} | ||
PROPERTIES | ||
INTERFACE_LINK_LIBRARIES "" | ||
LINK_INTERFACE_LIBRARIES "" | ||
LINK_FLAGS "-Wl,--version-script=${CMAKE_SOURCE_DIR}/src/XrdTpc/export-lib-symbols" | ||
COMPILE_DEFINITIONS "XRD_CHUNK_RESP") | ||
|
||
#----------------------------------------------------------------------------- | ||
# Install | ||
#----------------------------------------------------------------------------- | ||
install( | ||
TARGETS ${LIB_XRD_TPC} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) | ||
|
||
endif() |
Oops, something went wrong.