|
Revision 140, 0.7 KB
(checked in by follower, 11 months ago)
|
|
Add author, license and copyright details. (Which weren't permitted in competition entry source.)
|
| Line | |
|---|
| 1 | /* |
|---|
| 2 | |
|---|
| 3 | Network Interface |
|---|
| 4 | |
|---|
| 5 | Generic wrapper around a specific network device. |
|---|
| 6 | |
|---|
| 7 | Author: |
|---|
| 8 | |
|---|
| 9 | Philip Lindsay <follower@rancidbacon.com> |
|---|
| 10 | |
|---|
| 11 | License: |
|---|
| 12 | |
|---|
| 13 | Copyright 2007-2008 // LGPL |
|---|
| 14 | |
|---|
| 15 | */ |
|---|
| 16 | |
|---|
| 17 | #ifndef _INTERFACE_H_ |
|---|
| 18 | #define _INTERFACE_H_ |
|---|
| 19 | |
|---|
| 20 | #include "w5100_device.h" |
|---|
| 21 | #include "connection.h" |
|---|
| 22 | |
|---|
| 23 | // TODO?: Do we want to have a "default" socket accessible by 'Network.read()' etc? |
|---|
| 24 | class NetworkInterface { |
|---|
| 25 | |
|---|
| 26 | public: |
|---|
| 27 | NetworkInterface(W5100Device& networkDevice); |
|---|
| 28 | |
|---|
| 29 | NetworkConnection listen(uint16_t port); |
|---|
| 30 | NetworkConnection connect(byte b0, byte b1, byte b2, byte b3, uint16 port); |
|---|
| 31 | |
|---|
| 32 | W5100Device& device; // TODO: Make this a generic "network device" interface |
|---|
| 33 | }; |
|---|
| 34 | |
|---|
| 35 | #endif |
|---|