#include <ExManagerNetWork.h>
Public Methods | |
void | Reset (void) |
void | Init (void) |
void | Draw (void) |
void | Connect (void) |
bool | GetNetstatState (void) |
void | SetNetstatState (bool state) |
ExCAction | InputAction (ExCAction Action) |
Static Public Methods | |
ExManagerNetwork * | CreateSingleton (void) |
Private Methods | |
ExManagerNetwork (void) | |
~ExManagerNetwork (void) | |
Private Attributes | |
ExCSocketClient * | m_SocketClient |
bool | m_ShowNetStat |
Static Private Attributes | |
bool | m_flag = false |
ExManagerNetwork * | m_instance = NULL |
|
Definition at line 43 of file ExManagerNetwork.cpp. References m_ShowNetStat.
00044 { 00045 m_ShowNetStat=false; 00046 } |
|
Definition at line 48 of file ExManagerNetwork.cpp.
00049 { 00050 } |
|
Definition at line 100 of file ExManagerNetwork.cpp. References Connect(), and Guard. Referenced by Connect(), and InputAction().
00101 { 00102 Guard(void ExManagerNetwork::Connect(void)) 00103 00104 UnGuard 00105 } |
|
Definition at line 29 of file ExManagerNetwork.cpp. References CreateSingleton(), Guard, m_flag, and m_instance. Referenced by CreateSingleton(), and main().
00029 { 00030 Guard(ExManagerNetwork* ExManagerNetwork::CreateSingleton(void)) 00031 if(!m_flag) 00032 { 00033 m_flag = true; // We are creating the error log now, so set flag to true 00034 m_instance = new ExManagerNetwork; // Create the error log 00035 }else 00036 { 00037 std::cout<<"Error singleton already created"<<std::endl; 00038 } 00039 return m_instance; 00040 UnGuard 00041 } |
|
Definition at line 78 of file ExManagerNetwork.cpp. References ExNihilo::EnterOrthoMode(), ExNihilo::LeaveOrthoMode(), and ExNihilo::RenderBitmapString(). Referenced by ExManagerOutput::DrawScene().
00079 { 00080 if(m_ShowNetStat) 00081 { 00082 glDisable(GL_LIGHTING); 00083 ExNihilo::EnterOrthoMode(); 00084 ExNihilo::RenderBitmapString(30,glutGet(GLUT_WINDOW_HEIGHT)-100,(void *)GLUT_BITMAP_HELVETICA_12,"NetStat"); 00085 ExNihilo::RenderBitmapString(30,glutGet(GLUT_WINDOW_HEIGHT)-80,(void *)GLUT_BITMAP_HELVETICA_12,"Ping : No Connexion"); 00086 ExNihilo::LeaveOrthoMode(); 00087 glEnable(GL_LIGHTING); 00088 } 00089 } |
|
Definition at line 91 of file ExManagerNetWork.h.
00092 {return m_ShowNetStat;} |
|
Definition at line 52 of file ExManagerNetwork.cpp. Referenced by InitManager().
00053 { 00054 /*m_SocketClient = new ExCSocketClient; 00055 m_SocketClient->SetSocketPort(5000); 00056 m_SocketClient->Init("ploksoftware"); 00057 m_SocketClient->Connect();*/ 00058 /* WSADATA WSAData; 00059 WSAStartup(MAKEWORD(2,0), &WSAData); 00060 00061 SOCKET sock; 00062 SOCKADDR_IN sin; 00063 char *buffer = new char[255]; 00064 00065 sock = socket(AF_INET, SOCK_STREAM, 0); 00066 00067 sin.sin_addr.s_addr = inet_addr("192.168.0.1"); 00068 sin.sin_family = AF_INET; 00069 sin.sin_port = htons(5000); 00070 00071 connect(sock, (SOCKADDR *)&sin, sizeof(sin)); 00072 //recv(sock, buffer, sizeof(buffer), 0); 00073 closesocket(sock); 00074 WSACleanup(); 00075 */ 00076 } |
|
Definition at line 107 of file ExManagerNetwork.cpp. References Connect(), CONNECT, Guard, InputAction(), ExCAction::m_Action, ExCAction::m_NextAction, and SetNetstatState(). Referenced by InputAction(), and ExManagerCommand::ProcesExCAction().
00108 { 00109 Guard(ExCAction ExManagerNetwork::InputAction(ExCAction Action)) 00110 switch(Action.m_Action) 00111 { 00112 case SHOW_NET_STAT: 00113 SetNetstatState(true); 00114 break; 00115 case HIDE_NET_STAT: 00116 SetNetstatState(false); 00117 break; 00118 case CONNECT: 00119 Connect(); 00120 break; 00121 } 00122 if(Action.m_NextAction){return *Action.m_NextAction;} 00123 else{return NOTHING;} 00124 UnGuard 00125 } |
|
Definition at line 93 of file ExManagerNetwork.cpp. References Guard, and Reset(). Referenced by Reset().
00094 { 00095 Guard(void ExManagerNetwork::Reset(void)) 00096 UnGuard 00097 } |
|
Definition at line 92 of file ExManagerNetWork.h. References m_ShowNetStat. Referenced by InputAction().
00092 {return m_ShowNetStat;} |
|
Definition at line 26 of file ExManagerNetwork.cpp. Referenced by CreateSingleton(). |
|
Definition at line 27 of file ExManagerNetwork.cpp. Referenced by CreateSingleton(). |
|
Definition at line 71 of file ExManagerNetWork.h. Referenced by ExManagerNetwork(), and SetNetstatState(). |
|
Definition at line 70 of file ExManagerNetWork.h. |