I developed a client/server system. The server will collect the data from the hardware using DAQmax and parallely it will listen on the port for the connection from the client. After connection, the server will send the collected data to the client.
When I run the system, I found out that sometimes the client cannot connect to the server due to the timeout error (error 65). Mostly it happened when the client start much later than the server. If the server and client started almost the same time, the problem seldomly happened.
I attached the client and the server codes here. Can anyone help me out? Thanks in advance.