#include <ExCSocket.h>
Inheritance diagram for ExCSocket:

Public Methods | |
| ExCSocket () | |
| ExCSocket (ExCSocket &socket) | |
| ExCSocket (int Handler) | |
| ExCSocket (int *Handler) | |
| ExCSocket (int domaine, int protocole) | |
| ~ExCSocket () | |
| int | GetHandler (void) |
| void | SetHandler (int) |
| void | Init (void) |
| char * | GetIp (void) |
| int | GetSocketPort (void) |
| void | SetSocketPort (int port) |
| void | Close (void) |
| ExCSocket () | |
| ExCSocket (ExCSocket &socket) | |
| ExCSocket (int Handler) | |
| ExCSocket (int *Handler) | |
| ExCSocket (int domaine, int protocole) | |
| ~ExCSocket () | |
| int | GetHandler (void) |
| void | SetHandler (int) |
| void | Init (void) |
| char * | GetIp (void) |
| int | GetSocketPort (void) |
| void | SetSocketPort (int port) |
| void | Close (void) |
Data Fields | |
| int | m_Port |
| char * | m_pIP |
| int | m_hSocket |
| hostent * | m_pInfosHost |
| in_addr | m_AdresseIP |
| sockaddr_in | m_AdresseSocket |
| char * | m_pIP |
| hostent * | m_pInfosHost |
| in_addr | m_AdresseIP |
| sockaddr_in | m_AdresseSocket |
|
|
Definition at line 8 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), Guard, m_hSocket, and m_Port. Referenced by ExCSocket(), ExCSocketClient::ExCSocketClient(), ExCSocketServer::ExCSocketServer(), and ~ExCSocket().
00009 {Guard(ExCSocket::ExCSocket())
00010 m_Port=5000;
00011 m_hSocket=socket(AF_INET,SOCK_STREAM,0);
00012 if(m_hSocket==-1)
00013 {
00014 EXC
00015 }
00016 UnGuard
|
|
|
Definition at line 28 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), GetHandler(), GetIp(), Guard, m_hSocket, m_pIP, and m_Port.
00029 {Guard(ExCSocket::ExCSocket(ExCSocket& socket))
00030 m_Port=socket.GetHandler();
00031 m_hSocket=socket.GetHandler();
00032 m_pIP=socket.GetIp();
00033 UnGuard
|
|
|
Definition at line 18 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), Guard, and SetHandler().
00019 {Guard(ExCSocket::ExCSocket(int handler))
00020 SetHandler(Handler);
00021 UnGuard
|
|
|
Definition at line 23 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), Guard, and SetHandler().
00024 {Guard(ExCSocket::ExCSocket(int handler))
00025 SetHandler(*Handler);
00026 UnGuard
|
|
||||||||||||
|
Definition at line 37 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), Guard, and m_hSocket.
00038 {Guard(ExCSocket::ExCSocket(int domaine,int protocole))
00039 m_hSocket=socket(domaine,protocole,0);
00040 if(m_hSocket==-1)
00041 {
00042 EXC
00043 }
00044 UnGuard
|
|
|
Definition at line 46 of file ExNihiloServer/ExCSocket.cpp. References ExCSocket(), Guard, and m_hSocket.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
Definition at line 98 of file ExNihiloServer/ExCSocket.cpp. References Close(), Guard, and m_hSocket. Referenced by Close(), and ExCSocketClient::Connect().
00099 {Guard(void ExCSocket::Close(void))
00100 close(m_hSocket);
00101 UnGuard
|
|
|
|
|
|
Definition at line 88 of file ExNihiloServer/ExCSocket.cpp. References GetHandler(), Guard, and m_hSocket. Referenced by ExCSocket(), and GetHandler().
00089 {Guard(ExCSocket::GetHandler())
00090 return m_hSocket;
00091 UnGuard
|
|
|
|
|
|
Definition at line 73 of file ExNihiloServer/ExCSocket.cpp. References GetIp(), Guard, and m_pIP. Referenced by ExCSocket(), and GetIp().
00074 {Guard(ExCSocket::GetIp(void))
00075 return m_pIP;
00076 UnGuard
|
|
|
|
|
|
Definition at line 78 of file ExNihiloServer/ExCSocket.cpp. References GetSocketPort(), Guard, and m_Port. Referenced by GetSocketPort().
00079 {Guard(ExCSocket::GetSocketPort())
00080 return m_Port;
00081 UnGuard
|
|
|
Reimplemented in ExCSocketServer, and ExCSocketClient. |
|
|
Reimplemented in ExCSocketServer, and ExCSocketClient. Definition at line 55 of file ExNihiloServer/ExCSocket.cpp. References Guard, Init(), m_AdresseIP, m_AdresseSocket, m_pInfosHost, m_pIP, and m_Port. Referenced by Init().
00056 {Guard(ExCSocket::Init(void))
00057
00058 if((m_pInfosHost=gethostbyname("lore"))==0)
00059 {
00060 EXC
00061 }
00062 memcpy(&m_AdresseIP,m_pInfosHost->h_addr,m_pInfosHost->h_length);
00063 m_pIP= new char[15];
00064 sprintf(m_pIP,"%s",inet_ntoa(m_AdresseIP));
00065
00066 memset(&m_AdresseSocket,0,sizeof(struct sockaddr_in));
00067 m_AdresseSocket.sin_family= AF_INET;//le domaine
00068 m_AdresseSocket.sin_port=htons(m_Port);
00069 memcpy(&m_AdresseSocket.sin_addr,m_pInfosHost->h_addr,m_pInfosHost->h_length);
00070
00071 UnGuard
|
|
|
|
|
|
Definition at line 93 of file ExNihiloServer/ExCSocket.cpp. References Guard, m_hSocket, and SetHandler(). Referenced by ExCSocket(), and SetHandler().
00094 {Guard(ExCSocket::SetHandler())
00095 m_hSocket=handler;
00096 UnGuard
|
|
|
|
|
|
Definition at line 83 of file ExNihiloServer/ExCSocket.cpp. References Guard, m_Port, and SetSocketPort(). Referenced by main(), and SetSocketPort().
00084 {Guard(ExCSocket::SetSocketPort(int port))
00085 m_Port=port;
00086 UnGuard
|
|
|
Definition at line 66 of file include/Tools/ExCSocket.h. |
|
|
Definition at line 65 of file ExNihiloServer/ExCSocket.h. Referenced by ExCSocketServer::Init(), ExCSocketClient::Init(), and Init(). |
|
|
Definition at line 67 of file include/Tools/ExCSocket.h. |
|
|
Definition at line 66 of file ExNihiloServer/ExCSocket.h. Referenced by ExCSocketClient::Connect(), ExCSocketServer::Init(), ExCSocketClient::Init(), Init(), and ExCSocketServer::Listen(). |
|
|
Definition at line 64 of file include/Tools/ExCSocket.h. Referenced by Close(), ExCSocketClient::Connect(), ExCSocket(), GetHandler(), ExCSocketServer::Init(), ExCSocketServer::Listen(), SetHandler(), ~ExCSocket(), and ExCSocketServer::~ExCSocketServer(). |
|
|
Definition at line 65 of file include/Tools/ExCSocket.h. |
|
|
Definition at line 64 of file ExNihiloServer/ExCSocket.h. Referenced by ExCSocketServer::Init(), ExCSocketClient::Init(), and Init(). |
|
|
Definition at line 63 of file include/Tools/ExCSocket.h. |
|
|
Definition at line 62 of file ExNihiloServer/ExCSocket.h. Referenced by ExCSocket(), GetIp(), ExCSocketServer::Init(), ExCSocketClient::Init(), and Init(). |
|
|
Definition at line 62 of file include/Tools/ExCSocket.h. Referenced by ExCSocket(), GetSocketPort(), ExCSocketServer::Init(), ExCSocketClient::Init(), Init(), and SetSocketPort(). |
1.3-rc1