class to handle network
Inheritance:
Public Methods
-
int Start( )
- start window socket dll.
-
void Stop()
- stop window socket dll.
-
int GetIpByName( const char* szHostName, char* szIp, int iLen )
- Save IP address that correspond to host name.
-
HCNetwork()
- Constructor - initialize internal variable
-
~HCNetwork()
- Destructor - if there is not active socket, close that socket.
-
void Close()
- close socket
-
char* GetErrorMessage()
- return error message.
-
bool IsCorrectIp( const char* szIp )
- Analyze whether IP address is correct.
-
int GetLocalIp( char* szIp, int iLen )
- get ip address of this program executing host.
Documentation
class to handle network
int Start( )
- start window socket dll.
If you use window socket, you must use this function in front of your program.
- Returns:
- if success, return 0.
otherwise return -1.
- Author:
- Yee Young Han
void Stop()
- stop window socket dll.
- Returns:
- nothing.
- Author:
- Yee Young Han
int GetIpByName( const char* szHostName, char* szIp, int iLen )
- Save IP address that correspond to host name.
- Parameters:
- szHostName - [in] host name - domain address
szIp - [out] Variable to store IP address that correspond to host name
iLen - [in] size of szIp
- Returns:
- if success, return 0.
otherwise return -1.
- Author:
- Yee Young Han
HCNetwork()
- Constructor - initialize internal variable
- Returns:
- nothing
- Author:
- Yee Young Han
~HCNetwork()
- Destructor - if there is not active socket, close that socket.
- Returns:
- nothing
- Author:
- Yee Young Han
void Close()
- close socket
- Returns:
- nothing
- Author:
- Yee Young Han
char* GetErrorMessage()
- return error message.
If function return error code, error detail is saved in error message.
- Returns:
- error message
- Author:
- Yee Young Han
bool IsCorrectIp( const char* szIp )
- Analyze whether IP address is correct.
- Parameters:
- szIp - ip address
- Returns:
- if ip address is correct, return true.
otherwise return false.
- Author:
- Yee Young Han
int GetLocalIp( char* szIp, int iLen )
- get ip address of this program executing host.
- Parameters:
- szIp - [out] variable for saving ip address
iLen - sizeo of szIp
- Returns:
- if success, return 0.
otherwise return -1.
- Author:
- Yee Young Han
- Direct child classes:
- HCUdpServer
HCUdpClient
HCTcpClient
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.