diff options
Diffstat (limited to 'Private/Source/Network/NetworkDevice.cpp')
| -rw-r--r-- | Private/Source/Network/NetworkDevice.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Private/Source/Network/NetworkDevice.cpp b/Private/Source/Network/NetworkDevice.cpp new file mode 100644 index 00000000..766e1f2e --- /dev/null +++ b/Private/Source/Network/NetworkDevice.cpp @@ -0,0 +1,34 @@ +/* + * ======================================================== + * + * NewKit + * 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 NewKit |
