|
|
@ -404,6 +404,27 @@ NetworkConnection NetworkInterface::listen(uint16_t port) {
|
|
|
|
|
|
|
|
|
|
|
|
// NetworkInterface Network = NetworkInterface(...); // TODO: Make this a global
|
|
|
|
// NetworkInterface Network = NetworkInterface(...); // TODO: Make this a global
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------- */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ----- EchoServer ------ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EchoServer {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
EchoServer(int port);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
NetworkConnection _connection; // TODO: Make public?
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EchoServer::EchoServer(int port) : _connection (NetworkConnection(port)) {
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ----------------------- */
|
|
|
|
/* ----------------------- */
|
|
|
|
|
|
|
|
|
|
|
|
// #define PIN_RESET 9 // WIZnet module /RESET
|
|
|
|
// #define PIN_RESET 9 // WIZnet module /RESET
|
|
|
|