harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Weimer ...@deneb.enyo.de>
Subject Re: RI's bug of Socket.getOutputStream().write(byte[]) ?
Date Fri, 23 Jun 2006 19:58:59 GMT
* Tim Ellison:

> Maybe I'm misunderstanding the flow of the test here.
>
> here's how I read it...
>
> Server Side                    Client Side
> -----------                    -----------
> 'server' listens on 1234
>                                'channel' connects
> 'server' accepts
> 'out' sends 2xCAPACITY bytes
> 'out' flushes
> 'out' closes server end
>                                'channel' reads in loop until -1
>                                assert that channel gets 2xCAPACITY bytes
>
>
> Is that right?

In this case, the effects of the close operation can overtake the
data.  You need the equivalent of shutdown(SHUT_WR) or
shutdown(SHUT_RDWR), or use some other form of synchronization.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message