Added concept of a max retry count to SecureSocket class #4650
This commit is contained in:
parent
994a9433fe
commit
81a70135bd
|
@ -35,6 +35,7 @@
|
|||
//
|
||||
|
||||
#define MAX_ERROR_SIZE 65535
|
||||
#define MAX_RETRY_COUNT 60
|
||||
|
||||
static const char kFingerprintDirName[] = "SSL/Fingerprints";
|
||||
//static const char kFingerprintLocalFilename[] = "Local.txt";
|
||||
|
@ -50,7 +51,8 @@ SecureSocket::SecureSocket(
|
|||
IEventQueue* events,
|
||||
SocketMultiplexer* socketMultiplexer) :
|
||||
TCPSocket(events, socketMultiplexer),
|
||||
m_secureReady(false)
|
||||
m_secureReady(false),
|
||||
m_maxRetry(MAX_RETRY_COUNT)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -59,7 +61,8 @@ SecureSocket::SecureSocket(
|
|||
SocketMultiplexer* socketMultiplexer,
|
||||
ArchSocket socket) :
|
||||
TCPSocket(events, socketMultiplexer, socket),
|
||||
m_secureReady(false)
|
||||
m_secureReady(false),
|
||||
m_maxRetry(MAX_RETRY_COUNT)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ public:
|
|||
UInt32 secureWrite(const void* buffer, UInt32 n);
|
||||
void initSsl(bool server);
|
||||
bool loadCertificates(String& CertFile);
|
||||
void maxRetry(int limit) { m_maxRetry = limit; };
|
||||
int maxRetry() const { return m_maxRetry; };
|
||||
|
||||
private:
|
||||
// SSL
|
||||
|
@ -78,4 +80,5 @@ private:
|
|||
private:
|
||||
Ssl* m_ssl;
|
||||
bool m_secureReady;
|
||||
int m_maxRetry;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue