39 #ifndef BLOCXX_SOCKET_HPP_INCLUDE_GUARD_
40 #define BLOCXX_SOCKET_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
57 #include <openssl/ssl.h>
61 namespace BLOCXX_NAMESPACE
106 {
m_impl->connect(addr); }
181 int write(
const void* dataOut,
int dataOutLen,
ErrorAction errorAsException = E_RETURN_ON_ERROR)
182 {
return m_impl->write(dataOut, dataOutLen, errorAsException); }
191 int read(
void* dataIn,
int dataInLen,
ErrorAction errorAsException = E_RETURN_ON_ERROR)
192 {
return m_impl->read(dataIn, dataInLen, errorAsException); }
200 BLOCXX_DEPRECATED
bool waitForInput(
int timeOutSecs)
210 {
return m_impl->waitForInput(timeout); }
218 BLOCXX_DEPRECATED
bool waitForOutput(
int timeOutSecs)
228 {
return m_impl->waitForOutput(timeout); }
245 std::istream& getInputStream()
246 {
return m_impl->getInputStream(); }
252 std::ostream& getOutputStream()
253 {
return m_impl->getOutputStream(); }
259 BLOCXX_DEPRECATED std::iostream& getIOStream()
260 {
return m_impl->getIOStream(); }
276 static void createShutDownMechanism();
282 static void shutdownAllSockets();
287 static bool gotShutDown() BLOCXX_DEPRECATED;
288 static
void deleteShutDownMechanism();
290 #if defined(BLOCXX_WIN32)
291 typedef HANDLE ShutDownMechanism_t;
296 static ShutDownMechanism_t getShutDownMechanism()
298 return s_shutDownMechanism;
301 #ifndef BLOCXX_NO_SSL
313 bool peerCertVerified()
const;
328 #pragma warning (push)
329 #pragma warning (disable: 4251)
335 #pragma warning (pop)