Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SmartRemote WifiFlexManager SmartRemote E7
Fork of HTTPServer by
Diff: HTTPServer.h
- Revision:
- 13:aa5338a5e452
- Parent:
- 9:c2a1462b9b71
- Child:
- 14:011edcd33e86
--- a/HTTPServer.h Wed Jun 05 23:39:24 2013 +0000
+++ b/HTTPServer.h Sat Jun 22 15:41:34 2013 +0000
@@ -23,7 +23,7 @@
#ifndef __HTTPSERVER_H__
#define __HTTPSERVER_H__
#include "mbed.h"
-#include "WiflyInterface.h"
+#include "EthernetInterface.h"
#include "HTTPConnection.h"
#include "HTTPRequestHandler.h"
@@ -76,14 +76,13 @@
class HTTPServer
{
- TCPSocketServer* m_pSvr;
+ TCPSocketServer m_Svr;
bool m_bServerListening;
- WiflyInterface m_wifly;
public:
/** Constructor for HTTPServer objects.
*/
- HTTPServer(PinName tx, PinName rx, PinName reset, PinName tcp_status, const char * ssid, const char * phrase, Security sec);
+ HTTPServer();
/** Destructor for HTTPServer objects.
*/
@@ -130,7 +129,7 @@
* @param port : port on which to listen for incoming connections
* @returns : -1 if an unrecoverable error occured, or 0 if everything was ok.
*/
- int start(int port = 80);
+ bool start(int port = 80);
/** Performs the regular polling of the server component. Needs to be called cyclically.
* The function will internally check whether new connections are requested by a client and will also poll all existing client connections.
@@ -139,10 +138,7 @@
* ready for processing the next request. Simply call \c poll as long as you want to serve new incoming requests.
*/
int poll(bool blocking = true);
-
- string getTime()
- { return m_wifly.getTime(false); }
-
+
private:
/** The standard error handler function.
* @param msg : Request message data.
