- 论坛徽章:
- 0
|
我方程序如下:
{
/*
** read the left of the transaction from the socket
*/
if( iLeft > MAX_DATA_LEN )
iRead = MAX_DATA_LEN;
else
iRead = iLeft;
iLen = u_read( commid, pczTmpBuf, iRead );
if( iLen <= 0 )
{
alarm( 0 );
return ( -1113 );
}
/*
** add the string ever time
*/
memcpy( ptr, pczTmpBuf, iLen );
iLeft = iLeft - iLen;
ptr = ptr + iLen;
}
while( iLeft > 0 ); /* all has recevied */
fcntl ( commid ,F_SETFL ,O_NONBLOCK ) ;
shutdown ( commid , 2 ) ;
CloseSocket ( commid ) ;
我方检测端口状态如下:
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp 0 0 188.11.1.208.4433 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4432 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4431 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4430 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4425 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4424 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4419 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4416 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4415 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4407 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4406 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4399 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4398 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4397 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4396 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4395 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4394 155.133.8.1.1500 FIN_WAIT_2
tcp 0 0 188.11.1.208.4391 155.133.8.1.1500 FIN_WAIT_2 |
|