Network: Get rid of now useless TcpBase
Former-commit-id: 5a682d6d58cc5e2b8bea19dbfc9acb1133b35337
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user