|P is for Practical|
I am using a server IO::Socket for incoming TCP connections. The program uses the IO::Handle->getline() function to read the command up to the command delimiter. This function is called only after verifying that data is available with IO::Select.
However, one client connection is occassionally giving problems during the reading of commands. The getline() functions returns a partial command and IO::Handle->error() is 1. The TCP connection is still alive, and after a few seconds the remaining data comes available for reading.
Is there any way I can get an error description to what happended here? I verified that the client program sending is not sending out these partial commands, it is writing whole commands to the server handle. Could it be a TCP packet size issue which is splitting commands into partial packets, where the second packet is received with a short delay? Anyone else experienced these partial commands?
In order to solve this problem, I would like to understand what is causing these partial commands.
Any help is appreciated.