trying to make telnetserver repo public

Dependents:   Telnet_server

Fork of NTPClient_NetServices by Donatien Garnier

Revision:
1:1f436e56925f
Parent:
0:de37f60b4d0f
Child:
4:7c3f1199256a
--- a/LPC2368/services/ntp/NTPClient.h	Fri Jun 11 16:27:11 2010 +0000
+++ b/LPC2368/services/ntp/NTPClient.h	Fri Jun 18 09:21:27 2010 +0000
@@ -38,7 +38,7 @@
   NTP_DNS //Could not resolve DNS Addr
 };
 
-class NTPClient
+class NTPClient : protected NetService
 {
 public:
   NTPClient();
@@ -66,10 +66,15 @@
     m_pCbMeth = (void (CDummy::*)(NTPResult)) pMethod;
   }
   
-  void init();
   void close();
   
+protected:
+  virtual void poll(); //Called by NetServices
+  
 private:
+  void init();
+  void open();
+  
   __packed struct NTPPacket //See RFC 4330 for Simple NTP
   {
     //WARN: We are in LE! Network is BE!
@@ -119,12 +124,14 @@
   
   NTPStep m_state;
   
+  NTPPacket m_pkt;
+  
   CDummy* m_pCbItem;
   void (CDummy::*m_pCbMeth)(NTPResult);
   
   void (*m_pCb)(NTPResult);
   
-  Timeout m_watchdog;
+  Timer m_watchdog;
   int m_timeout;
   
   bool m_closed;