Error 56 is thrown by your application, when it does not receive a network response in the defined time limit.
Read this link to know more about this error and other related errors
This link will teach you how top develop a simple TCP/IP communication code
Any doubts, do ask
Regards,
Dev