write:: Bad file descriptor write:: Resource temporarily unavailable

char  data[ 1000000 ];
                
// strcpy(data,"hahahahahahahha");
                 int  i;
                
for  (i  =   0 ;i  <   999000 ;i ++ )
                        data[i] 
=   ' a ' ;
                
int  data_len  =  strlen(data);
                
int  w_res;
                
for  (i  =   0 ;i  <   2 ;i ++ )
                
{
                w_res 
= write(SocketFd,data,data_len);
                
if (w_res == -1)
                
{
                        perror(
"write:");
                }

                
else
                
{
                        printf(
"ok ");
                }

write:: Bad file descriptor  本地连接close
write:: Resource temporarily unavailable 服务器连接close

你可能感兴趣的:(write:: Bad file descriptor write:: Resource temporarily unavailable)