Invalid socket error

Dear all,
I am using W5500 with Stm32 controller,
I have downloaded IO library,
I am able to ping my module from computer,
But when I try to connect to TCP server running on pc using send() function
It returns -5 error .
Unable to figure out what is happening,
Can any one help …

This error code is Invalid socket mode of socket operation.
You can check the value of getSn_MR and used socket function.
If you use the TCP client using W5500, you cab use the function of socket, connect, send, recv.
Please refer the loopback of appplication.

ioLibrary_Driver/loopback.c at master · Wiznet/ioLibrary_Driver (github.com)