Thread: Problem fxping
View Single Post
Old 10-01-2003, 12:46 AM  
darkone
Disabled
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Default

ioFTPD performs graceful socket shutdown which might cause up to 6minute delay, if other side is not posting shutdown notification.

Most common implementation is:

...
shutdown(SD_BOTH);
closesocket();

Some servers are doing (wrong implementation, which may cause ioftpd to wait until timeout):

...
closesocket();


ioFTPD does (optimal implementation ):

setsockopt(); // No lingering
...
shutdown(SD_SEND);
recv();
closesocket();
darkone is offline   Reply With Quote