AndroMeta  2.0.0
AndroMeta/include/AndroMeta/MListener.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009-2012 AndroMeta LLC. All rights reserved.
00003  *
00004  * AndroMeta LLC retains all intellectual property and proprietary 
00005  * rights to this software and related documentation and any modifications 
00006  * thereto.  Any use, reproduction, disclosure, or distribution of this 
00007  * software and related documentation without an express license agreement 
00008  * from AndroMeta LLC is strictly prohibited.
00009  * 
00010  */
00011 
00018 #ifndef ANDROMETA_M_LISTENER_H
00019 #define ANDROMETA_M_LISTENER_H
00020 
00021 #include <AndroMeta/MObject.h>
00022 #include <AndroMeta/MTime.h>
00023 
00024 namespace Meta{
00025   
00026   class MSocket;
00027   
00036   class MListener{
00037   public:
00038     
00042     MListener();
00043     
00047     ~MListener();
00048     
00055     bool listen(int port);
00056     
00065     bool accept(MSocket* socket);
00066     
00076     bool accept(MSocket* socket, const mtime& time); 
00077     
00081     void close();
00082     
00086     int port() const;
00087     
00088   private:  
00089     MListener& operator=(const MListener&);
00090     MListener(const MListener&);
00091     
00092     class MListener_* x_;
00093   };
00094   
00095 } // end namespace Meta
00096 
00097 #endif // ANDROMETA_M_LISTENER_H