class HCNetwork

class to handle network

Inheritance:


Public Methods

[more]int Start( )
start window socket dll.
[more]void Stop()
stop window socket dll.
[more]int GetIpByName( const char* szHostName, char* szIp, int iLen )
Save IP address that correspond to host name.
[more] HCNetwork()
Constructor - initialize internal variable
[more] ~HCNetwork()
Destructor - if there is not active socket, close that socket.
[more]void Close()
close socket
[more]char* GetErrorMessage()
return error message.
[more]bool IsCorrectIp( const char* szIp )
Analyze whether IP address is correct.
[more]int GetLocalIp( char* szIp, int iLen )
get ip address of this program executing host.


Documentation

class to handle network
oint 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

ovoid Stop()
stop window socket dll.

Returns:
nothing.
Author:
Yee Young Han

oint 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

o HCNetwork()
Constructor - initialize internal variable

Returns:
nothing
Author:
Yee Young Han

o ~HCNetwork()
Destructor - if there is not active socket, close that socket.

Returns:
nothing
Author:
Yee Young Han

ovoid Close()
close socket

Returns:
nothing
Author:
Yee Young Han

ochar* GetErrorMessage()
return error message.

If function return error code, error detail is saved in error message.

Returns:
error message
Author:
Yee Young Han

obool 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

oint 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++.