scottd78
asked on
Is there a work around to an InputStream.read block when no data is available?
Is there a work around to an InputStream.read block when no data is available?
Use non-blocking io
What exactly is it you're doing?
ASKER
can you give me more detail on how to use non-blocking io?
I'm sending ftp commands over a socket using inputstreams and reading the server output. Running into issues when something goes wrong with the FTP server and it doesn't respond.
I'm sending ftp commands over a socket using inputstreams and reading the server output. Running into issues when something goes wrong with the FTP server and it doesn't respond.
It's more likely that the fault is with what you're sending the server. Once you've connected successfully, there is seldom much reason that anything will 'go wrong' on the server side such that you're going to get a blocked read. Can you be more specific about when this is happening?
ASKER
The ls command on the server can be deleted by people who have to have access to it, so if that gets deleted and I try to LIST, the server hangs.
>>The ls command on the server can be deleted by people
How? The ls command is integral to ftp and the os
How? The ls command is integral to ftp and the os
ASKER
I'm not very familiar with how they have the FTP setup but this is what I do know. Each FTP users root directory has a /bin directory that includes their own ls binary. I'm guessing they don't want to give permissions to the /bin/ls command for security reasons.
Why would they allow access to a directory by ftp then refuse to list it? However this is being done, (a file permission blunder disallowing listing is also possible) then you should do the same - disallow the use of the list command by your program
ASKER
They don't disallow listing ... its when someone deletes that ls command I have a problem. I need to do an ls to verify the complete file has been transferred sucessfully.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
8-)
ASKER
I hope no one yells at me now!