fclose is used in close_local_endpoint only for WinCE.
close used for other platforms.