You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
685 B
36 lines
685 B
/*
|
|
|
|
Network Interface
|
|
|
|
Generic wrapper around a specific network device.
|
|
|
|
Author:
|
|
|
|
Philip Lindsay <follower@rancidbacon.com>
|
|
|
|
License:
|
|
|
|
Copyright 2007-2008 // LGPL
|
|
|
|
*/
|
|
|
|
#ifndef _INTERFACE_H_
|
|
#define _INTERFACE_H_
|
|
|
|
#include "w5100_device.h"
|
|
#include "connection.h"
|
|
|
|
// TODO?: Do we want to have a "default" socket accessible by 'Network.read()' etc?
|
|
class NetworkInterface {
|
|
|
|
public:
|
|
NetworkInterface(W5100Device& networkDevice);
|
|
|
|
NetworkConnection listen(uint16_t port);
|
|
NetworkConnection connect(byte b0, byte b1, byte b2, byte b3, uint16 port);
|
|
|
|
W5100Device& device; // TODO: Make this a generic "network device" interface
|
|
};
|
|
|
|
#endif
|