diff options
Diffstat (limited to 'Source/Network/NetworkDevice.cpp')
| -rw-r--r-- | Source/Network/NetworkDevice.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
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 <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 |
