aboutsummaryrefslogtreecommitdiff
path: root/dep/src/sockets/StreamSocket.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:35:07 -0700
committermaximius <none@none>2009-10-17 15:35:07 -0700
commit26b5e033ffde3d161382fc9addbfa99738379641 (patch)
treea344f369ca32945f787a02dee35c3dbe342bed7e /dep/src/sockets/StreamSocket.cpp
parentf21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff)
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
Diffstat (limited to 'dep/src/sockets/StreamSocket.cpp')
-rw-r--r--dep/src/sockets/StreamSocket.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/dep/src/sockets/StreamSocket.cpp b/dep/src/sockets/StreamSocket.cpp
index c8a3c32e496..84bcf7bdca1 100644
--- a/dep/src/sockets/StreamSocket.cpp
+++ b/dep/src/sockets/StreamSocket.cpp
@@ -1,12 +1,10 @@
#include "StreamSocket.h"
#include "ISocketHandler.h"
-
#ifdef SOCKETS_NAMESPACE
namespace SOCKETS_NAMESPACE {
#endif
-
StreamSocket::StreamSocket(ISocketHandler& h) : Socket(h)
,m_bConnecting(false)
,m_connect_timeout(5)
@@ -20,12 +18,10 @@ StreamSocket::StreamSocket(ISocketHandler& h) : Socket(h)
{
}
-
StreamSocket::~StreamSocket()
{
}
-
void StreamSocket::SetConnecting(bool x)
{
if (x != m_bConnecting)
@@ -42,13 +38,11 @@ void StreamSocket::SetConnecting(bool x)
}
}
-
bool StreamSocket::Connecting()
{
return m_bConnecting;
}
-
bool StreamSocket::Ready()
{
if (GetSocket() != INVALID_SOCKET && !Connecting() && !CloseAndDelete())
@@ -56,115 +50,95 @@ bool StreamSocket::Ready()
return false;
}
-
void StreamSocket::SetConnectTimeout(int x)
{
m_connect_timeout = x;
}
-
int StreamSocket::GetConnectTimeout()
{
return m_connect_timeout;
}
-
void StreamSocket::SetFlushBeforeClose(bool x)
{
m_flush_before_close = x;
}
-
bool StreamSocket::GetFlushBeforeClose()
{
return m_flush_before_close;
}
-
int StreamSocket::GetConnectionRetry()
{
return m_connection_retry;
}
-
void StreamSocket::SetConnectionRetry(int x)
{
m_connection_retry = x;
}
-
int StreamSocket::GetConnectionRetries()
{
return m_retries;
}
-
void StreamSocket::IncreaseConnectionRetries()
{
m_retries++;
}
-
void StreamSocket::ResetConnectionRetries()
{
m_retries = 0;
}
-
void StreamSocket::SetCallOnConnect(bool x)
{
Handler().AddList(GetSocket(), LIST_CALLONCONNECT, x);
m_call_on_connect = x;
}
-
bool StreamSocket::CallOnConnect()
{
return m_call_on_connect;
}
-
void StreamSocket::SetRetryClientConnect(bool x)
{
Handler().AddList(GetSocket(), LIST_RETRY, x);
m_b_retry_connect = x;
}
-
bool StreamSocket::RetryClientConnect()
{
return m_b_retry_connect;
}
-
void StreamSocket::SetLineProtocol(bool x)
{
m_line_protocol = x;
}
-
bool StreamSocket::LineProtocol()
{
return m_line_protocol;
}
-
void StreamSocket::SetShutdown(int x)
{
m_shutdown = x;
}
-
int StreamSocket::GetShutdown()
{
return m_shutdown;
}
-
-
#ifdef SOCKETS_NAMESPACE
} // namespace SOCKETS_NAMESPACE {
#endif
-