bool DataSend(unsigned char* sendbuf,int lenth,SOCKET& sd,bool recon)
{
bool linked=true;
int rt_code = 0;
if(linked==true)
{
rt_code = write(sd,(char*)sendbuf,lenth);
if (rt_code == SOCKET_ERROR)
{
rt_code = WSAGetLastError();
if (rt_code == WSAEWOULDBLOCK)
return true;
else
{
closesocket(sd);
sd = INVALID_SOCKET;
return false;
}
}
else
return true;
}
  return false;
}