From 5339d016c07bf717ee388f4feb73544087324af0 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 6 Jan 2024 09:14:11 +0100 Subject: git: port from mercurial repo. Signed-off-by: Amlal El Mahrouss --- Source/Network/NetworkDevice.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Source/Network/NetworkDevice.cpp (limited to 'Source/Network/NetworkDevice.cpp') diff --git a/Source/Network/NetworkDevice.cpp b/Source/Network/NetworkDevice.cpp new file mode 100644 index 00000000..8e9fc159 --- /dev/null +++ b/Source/Network/NetworkDevice.cpp @@ -0,0 +1,34 @@ +/* + * ======================================================== + * + * NewKit + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#include + +// network devices implementation. +// PPPNetworkService, TCPNetworkDevice, UDPNetworkService + +namespace hCore +{ + NetworkDevice::NetworkDevice(void (*out)(NetworkDeviceCommand), void (*in)(NetworkDeviceCommand), void(*on_cleanup)(void)) + : IDevice(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 -- cgit v1.2.3