blob: 8e9fc15900e0f607560d84dc297863db4142df60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
/*
* ========================================================
*
* NewKit
* Copyright Mahrouss Logic, all rights reserved.
*
* ========================================================
*/
#include <NetworkKit/NetworkDevice.hpp>
// network devices implementation.
// PPPNetworkService, TCPNetworkDevice, UDPNetworkService
namespace hCore
{
NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand), void (*in)(NetworkDeviceCommand), void(*on_cleanup)(void))
: IDevice<NetworkDeviceCommand>(out, in), fCleanup(on_cleanup)
{
#ifdef __DEBUG__
kcout << "NetworkDevice init.\r\n";
#endif
}
NetworkDevice::~NetworkDevice()
{
#ifdef __DEBUG__
kcout << "NetworkDevice cleanup.\r\n";
#endif
if (fCleanup)
fCleanup();
}
} // namespace NewKit
|