Defined in file: hzUdpClient.h
The hzUdpClient class enables an application to act as a client using UDP.
Constructors/Detructors
| hzUdpClient* | hzUdpClient | (void) | |
| void | ~hzUdpClient | (void) |
Public Methods:
| hzEcode | Connect | (hzString& Hostname)uint32_t nPort, bool bLocal, | There is of course, no such thing as a UDP connection in the same way there are TCP connections. However the host must still be looked up and a socket obtained before one can send and receive data so in terms of function call sequence, the two forms of communication are conceptually similar. It is the role of this function to do the host lookup and obtain the datagram socket. |
| char* | GetCbuf | (void) | |
| unsigned char* | GetUbuf | (void) | |
| hzEcode | RecvChain | (hzChain& C) | Reads one or more packets from the socket into the supplied chain until a zero length read occurs. |
| hzEcode | RecvPkt | (hzPacket* pData)uint32_t& nRecv, | Read a packet from the socket into the client buffer. |
| hzEcode | SendChain | (hzChain& C) | Write supplied chain content to a socket |
| hzEcode | SendPkt | (hzPacket* pData)uint32_t nLen, | Purpose: Write buffer content to a socket |
Member Variables:
| sockaddr_in | m_CliAddr | address of client | |
| hzString | m_Hostname | Server client is connecting to | |
| sockaddr_in | m_SvrAddr | address of server | |
| int | m_SvrLen | Length of SvrAddr in bytes | |
| uint32_t | m_nPort | Port on server to connect to | |
| uint32_t | m_nSock | Connected socket | |
| hostent* | m_pHost | the server | |
| hzPacket | m_pack | IP packet recepticle |