[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ADTPro Issue Transferring IIgs-->WinXP
On Mar 5, 7:17 pm, "Polymorph" <polymorp...@hotmail.com> wrote:
> David,
>
> I sent you an email to your my-deja email address, but haven't heard
> back from you yet. I'll copy the email that I sent you here:
Sorry, that address has been gone since Google bought Dejanews. You
can get a hold of me from the adtpro.sourceforge.net project page -
Sourceforge will handle the email translation.
> I have found the area of code that is causing my transfers to fail -
> it is in SerialTransport.java in the readByte() method. It seems that
> you set the ports timeout dependent upon the argument given, however,
> is this necessary for every byte?
There are situations that need a timeout, and situations that don't.
As I hacked the timeout code into the base, not thinking it through
particularly carefully, that was the solution I came up with in the
shortest amount of time. It would make more sense to have different
read methods that either did or did not care about timeouts.
> In my case,
> it is this setting of the timeout value that is causing problems. I
> verified my guess by commenting the timeout setting/diabling code as
> follows:
>
> try
> {
> // if (timeout == 0)
> // port.disableReceiveTimeout();
> // else
> // port.enableReceiveTimeout(timeout);
> oneByte = inputStream.readByte();
> hasData = true;
> }
Thanks for pinning that down. I'll have a look and make that more
sane. I'm knee-deep in hacking together audio-based file transfer
code at the moment.
> What are your thoughts related to the problems that I've identified?
It needs fixing by means of a much better design than I originally put
together.
> I wonder why other people aren't
> seeing this problem?
Maybe no one else is using it. :-)