blob: 4f07a5ebacc8bbe325b7364c26062868526407b3 (
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
|
/*
* ========================================================
*
* HCore
* Copyright 2024 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))
: DeviceInterface<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 HCore
|