I'm using function below in order 

```
int sendData(int const Socket, unsigned char const * const Data, size_t const Length)
{
    return send(Socket, Data, Length, 0);
}

```

Function returns send bytes count.

If I disconnect server this function returns send bytes count equals to `Length`. Looks that system don't know other side is disconnected.

How to solve this problem?