Skip to content

Commit d07249a

Browse files
defined network interface abstrac class
1 parent 5176993 commit d07249a

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

libraries/NetworkAPI/src/interface.h

+14-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1-
#pragma once
1+
#pragma once
2+
3+
/*
4+
* The following class represent a generic network interface independently of the
5+
* Network engine that is working on top of.
6+
*/
7+
class NetworkInterface {
8+
public:
9+
virtual ~NetworkInterface() {};
10+
virtual int begin(const IPAddress &ip = INADDR_NONE, const IPAddress &nm = INADDR_NONE, const IPAddress &gw = INADDR_NONE) = 0;
11+
virtual void task() = 0;
12+
virtual void up() = 0;
13+
virtual void down() = 0;
14+
};

0 commit comments

Comments
 (0)