00001 /* 00002 * Network session reception header 00003 * 00004 * This file is part of the "SoftPixel Engine" (Copyright (c) 2008 by Lukas Hermanns) 00005 * See "SoftPixelEngine.hpp" for license information. 00006 */ 00007 00008 #ifndef __SP_NETWORK_SESSION_RECEPTION_H__ 00009 #define __SP_NETWORK_SESSION_RECEPTION_H__ 00010 00011 00012 #include "Base/spStandard.hpp" 00013 00014 #ifdef SP_COMPILE_WITH_NETWORKSYSTEM 00015 00016 00017 #include "Framework/Network/spNetworkBaseUDP.hpp" 00018 #include "Base/spThreadManager.hpp" 00019 00020 00021 namespace sp 00022 { 00023 namespace network 00024 { 00025 00026 00037 class SP_EXPORT NetworkSessionReception : public NetworkBaseUDP 00038 { 00039 00040 public: 00041 00042 NetworkSessionReception(); 00043 ~NetworkSessionReception(); 00044 00045 /* === Functions === */ 00046 00055 bool openSession( 00056 u16 Port, const io::stringc &SessionKey, const io::stringc &SessionDescription 00057 ); 00058 void closeSession(); 00059 00060 /* === Inline functions === */ 00061 00062 inline io::stringc getSessionKey() const 00063 { 00064 return SessionKey_; 00065 } 00066 inline io::stringc getSessionDescription() const 00067 { 00068 return SessionDescription_; 00069 } 00070 00071 private: 00072 00073 /* === Members === */ 00074 00075 io::stringc SessionKey_; 00076 io::stringc SessionDescription_; 00077 00078 ThreadManager* Thread_; 00079 00080 }; 00081 00082 00083 } // /namespace network 00084 00085 } // /namespace sp 00086 00087 00088 #endif 00089 00090 #endif 00091 00092 00093 00094 // ================================================================================