Platform_Win32_Network.h
Go to the documentation of this file.00001 00010 #ifndef __Platform_Win32_Network_H__ 00011 #define __Platform_Win32_Network_H__ 00012 00013 // Includes 00014 #include "Platform_Network.h" 00015 #include "Array.h" 00016 00017 // Forward declares 00018 class Platform_Win32_Network_Server; 00019 class Platform_Win32_Network_Client; 00020 00021 // Platform_Win32_Network 00022 class Platform_Win32_Network:public Platform_Network,PlatformEventListener 00023 { 00024 00025 public: 00026 Platform_Win32_Network(); 00027 ~Platform_Win32_Network(); 00028 00029 virtual void OnOsYield(); 00030 00031 virtual Platform_Network_Server* CreateServer( 00032 ConnectionMode mode, 00033 int port 00034 ); 00035 00036 virtual Platform_Network_Client* CreateClient( 00037 ConnectionMode mode, 00038 const char* address, 00039 int port 00040 ); 00041 00042 00043 bool IsNetworkingEnabled(); 00044 void DisableNetworking(); 00045 00046 bool UsingWinsock2(); 00047 00048 void ClientDestroyed(Platform_Win32_Network_Client* client); 00049 void ServerDestroyed(Platform_Win32_Network_Server* server); 00050 00051 const char* GetErrorMessage(unsigned int errorCode); 00052 private: 00053 bool networkingEnabled_; 00054 bool usingWinsock2_; 00055 Array<Platform_Win32_Network_Server*> servers_; 00056 Array<Platform_Win32_Network_Client*> clients_; 00057 }; 00058 00059 #endif /* __Platform_Win32_Network_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
