Platform_Win32_Network_Client.h
Go to the documentation of this file.00001 00011 #ifndef __Platform_Win32_Network_Client_H__ 00012 #define __Platform_Win32_Network_Client_H__ 00013 00014 // Includes 00015 #include "Platform_Network.h" 00016 #include "Platform_Network_Client.h" 00017 #include "DynamicBuffer.h" 00018 00019 // Forward declares 00020 class Platform_Win32_Network; 00021 00022 // Platform_Win32_Network_Client 00023 class Platform_Win32_Network_Client: public Platform_Network_Client 00024 { 00025 public: 00026 Platform_Win32_Network_Client(Platform_Win32_Network* network, Platform_Network::ConnectionMode mode, const char* address, int port); 00027 virtual ~Platform_Win32_Network_Client(); 00028 00029 virtual Platform_Network::ConnectionMode GetConnectionMode(); 00030 virtual const char* GetAddress(); 00031 virtual int GetPort(); 00032 00033 virtual bool Connect(); 00034 virtual bool Disconnect(); 00035 virtual bool IsConnected(); 00036 00037 virtual void SendData( 00038 const void* data, 00039 int size 00040 ); 00041 00042 virtual int GetReceivedDataSize(); 00043 00044 virtual void GetReceivedData( 00045 DynamicBuffer* buffer 00046 ); 00047 00048 void Update(); 00049 private: 00050 Platform_Win32_Network* network_; 00051 Platform_Network::ConnectionMode mode_; 00052 int port_; 00053 const char* address_; 00054 SOCKET socket_; 00055 bool waitingToConnect_; 00056 bool connected_; 00057 DynamicBuffer receivedData_; 00058 DynamicBuffer dataToSend_; 00059 int maxMessageSize_; 00060 }; 00061 00062 #endif /* __Platform_Win32_Network_Client_H__ */
Reproduction/republishing of any material on this site without permission is strictly prohibited.
