Instruction manual
4
1. Ethernet 4-41
Network Communications
Others Functions
Initialization Function
int HKEtn_Init(unsigned short Port=10000,int Retry=3,int RecvTime=2,int
RecvTime2=10)
Creates a socket.
• Parameters
Port Set 10000 or above.
Retry Number of send retrials
RecvTime Receive timeout
RecvTime2 Receive timeout 2
• Return values
Success TRUE
Failure FALSE
Error details Get using HKEtn_GetLastError ().
Receive Wait from ZM-300
int HKEtn_Recvfrom(BYTE *dp,short *lpCnt)
This function is retained internally until data is received from the ZM-300 series. The
function returns a response and ends only when a command is received. The user should
interpret the received data and create the next action. This function must be executed
within the thread.
• Parameters
*dp Top pointer of receive buffer
Allocate 5000 bytes.
*lpCnt Returns the number of bytes received.
• Return values
Success TRUE
Failure FALSE
Error details Get using HKEtn_GetLastError ().
Cancel Receive Wait Function
void HKEtn_Cancel(void)
Cancels the function in the receive wait status, such as Recvfrom().