2 #ifndef HTID_REQUESTOR_H
3 #define HTID_REQUESTOR_H
4 #include /**/ "ace/pre.h"
6 #include "HTBP_Export.h"
7 #include "ace/SString.h"
8 #include "ace/Synch_Traits.h"
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
12 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 // Forward declarations
17 class ACE_SOCK_Stream
;
23 // Forward declarations
27 * ACE_HTBP_ID_Requestor
29 * @brief This singleton class is to be used to get a HTID
31 class HTBP_Export ID_Requestor
35 ID_Requestor (Environment
* = 0);
38 ACE_TCHAR
*get_HTID ();
41 /// Connects to the remote host
42 int connect_to_server (ACE_SOCK_Stream
*cli_stream
);
44 /// Send HTTP GET request to the server.
45 int send_request (ACE_SOCK_Stream
*cli_stream
);
51 static ACE_TString htid_
;
52 static ACE_SYNCH_MUTEX htid_lock_
;
57 ACE_END_VERSIONED_NAMESPACE_DECL
59 #include /**/ "ace/post.h"
60 #endif /* HTID_REQUESTOR_H */