summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/Network/NetworkDevice.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Private/Source/Network/NetworkDevice.cxx')
-rw-r--r--Private/Source/Network/NetworkDevice.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/Private/Source/Network/NetworkDevice.cxx b/Private/Source/Network/NetworkDevice.cxx
new file mode 100644
index 00000000..8443467c
--- /dev/null
+++ b/Private/Source/Network/NetworkDevice.cxx
@@ -0,0 +1,32 @@
+/*
+ * ========================================================
+ *
+ * HCore
+ * 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))
+ : 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