Go Back   FlashFXP Forums > > > >

Bug Reports Report bugs here. (non-beta releases only)

 
 
Thread Tools Display Modes
Old 06-03-2002, 01:16 PM   #1
superbonbon
Junior Member
 
Join Date: May 2002
Posts: 5
Default socket problem

Thanks Bigstar

Unfortunatly your latest build still does not solve my problem.
the socket.shutdownoutput() methods are still not working.. when i try to upload a file, the EOF is sent at the first byte..
sessionSocketDTP.shutdownOutput() causes the problem with your client, the same code works perfectly fine with other FTP clients.

Well thanks for trying to fix something, but looks like the gremlin is the winner this time )

If you wanna give it a last try, Here is the method I call to initialize the DTP socket with a comment where the method call causes problems, i hope it will help you a little bit ( even if i doubt about it ) :

public void initializeDTPSocket( boolean openInputStream, boolean openOutputStream, boolean useCharSet ) throws IOException {

if ( openInputStream && openOutputStream ) {
throw new IOException( "Opening DTP output and input at the same time is not allowed" );
}

if ( !isPASVMode ) {
sessionSocketDTP = getNewDTPSocket( getSessionDetails().getHostAddress(), getSessionDetails().getDTPPort() );
initializeSocket();
}

if ( sessionSocketDTP == null ) {
throw new IOException( "DTP Socket has not been initialized use PORT or PASV command first" );
}

if ( openInputStream ) {
if ( useCharSet ) {
inputReader = new InputStreamReader( sessionSocketDTP.getInputStream(), getPIrw().getCurrentCharSet() );
} else {
input = new BufferedInputStream( sessionSocketDTP.getInputStream(), inputDTPBuffSize );
}
// that method call causes the problem when uploading a file
sessionSocketDTP.shutdownOutput();
// result : EOF reached after first byte read with method input.read().
}
if ( openOutputStream ) {
if ( useCharSet ) {
outputWriter = new OutputStreamWriter( sessionSocketDTP.getOutputStream(), getPIrw().getCurrentCharSet() );
} else {
output = new BufferedOutputStream( sessionSocketDTP.getOutputStream(), outputDTPBuffSize );
}
// that call doesn t seems to bring troubles when a file is sent
sessionSocketDTP.shutdownInput();
}
}
sorry for the code indentation
superbonbon is offline  
 

Tags
ftp, java, server, socket, upload

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CHMOD bug iXi Bug Reports 2 12-23-2002 07:53 AM


All times are GMT -5. The time now is 11:04 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)