bool send_data(int connfd, char *pbuffer, unsigned int &len,int flag)
{
if ((connfd < 0) || (0 == pbuffer))
{
return false;
}
int result = 0;
int remain_size = (int) len;
int send_size = 0;
const char *p = pbuffer;
time_t start_time = time(NULL);
int time_out = 3;
do
{
if (time(NULL) > start + time_out)
{
return false;
}