Network: Get rid of now useless TcpBase

Former-commit-id: 5a682d6d58cc5e2b8bea19dbfc9acb1133b35337
This commit is contained in:
Lynix
2015-11-10 12:14:59 +01:00
parent 1bbf038cc6
commit 2a70758f08
9 changed files with 48 additions and 121 deletions

View File

@@ -1,30 +0,0 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Utility module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Network/TcpBase.hpp>
#include <Nazara/Core/CallOnExit.hpp>
#include <Nazara/Core/Error.hpp>
#include <limits>
#include <Nazara/Network/Debug.hpp>
#if defined(NAZARA_PLATFORM_WINDOWS)
#include <Nazara/Network/Win32/SocketImpl.hpp>
#else
#error Missing implementation: Socket
#endif
namespace Nz
{
void TcpBase::OnOpened()
{
AbstractSocket::OnOpened();
m_isLowDelayEnabled = false; //< Nagle's algorithm, is this enabled everywhere?
m_isKeepAliveEnabled = false; //< default documentation value, OS can change this (TODO: Query OS default value)
m_keepAliveInterval = 1000; //< default documentation value, OS can change this (TODO: Query OS default value)
m_keepAliveTime = 7200000; //< default documentation value, OS can change this (TODO: Query OS default value)
ChangeState(SocketState_NotConnected);
}
}

View File

@@ -187,15 +187,19 @@ namespace Nz
void TcpClient::OnClose()
{
TcpBase::OnClose();
AbstractSocket::OnClose();
m_peerAddress = IpAddress::Invalid;
}
void TcpClient::OnOpened()
{
TcpBase::OnOpened();
AbstractSocket::OnOpened();
m_isLowDelayEnabled = false; //< Nagle's algorithm, is this enabled everywhere?
m_isKeepAliveEnabled = false; //< default documentation value, OS can change this (TODO: Query OS default value)
m_keepAliveInterval = 1000; //< default documentation value, OS can change this (TODO: Query OS default value)
m_keepAliveTime = 7200000; //< default documentation value, OS can change this (TODO: Query OS default value)
m_peerAddress = IpAddress::Invalid;
}

View File

@@ -49,14 +49,14 @@ namespace Nz
void TcpServer::OnClose()
{
TcpBase::OnClose();
AbstractSocket::OnClose();
m_boundAddress = IpAddress::Invalid;
}
void TcpServer::OnOpened()
{
TcpBase::OnOpened();
AbstractSocket::OnOpened();
m_boundAddress = IpAddress::Invalid;
}