dpathakj / junixsocket

Automatically exported from code.google.com/p/junixsocket
0 stars 0 forks source link

shutdownInput() and shutdownOutput() are not implemented #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
shutdownInput() and shutdownOutput() are not implemented in
AFUNIXSocketImpl, causing exceptions. The attached simple patch adds the
implementations.

Original issue reported on code.google.com by tmi...@gmail.com on 8 Nov 2009 at 4:55

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks, good idea.

However: Your patch makes things worse because now it would never shutdown any 
file
descriptor because "closed" is set to true before 
#shutdownInput()/#shutdownOutput()
gets called.

I will keep the AFUNIXSocketImpl#close() method as it is and just add the two
shutdown methods.

Original comment by ckkohl79 on 3 Dec 2009 at 1:18

GoogleCodeExporter commented 8 years ago
Improved the patch and committed to SVN Trunk (r18).

Original comment by ckkohl79 on 3 Dec 2009 at 1:32

GoogleCodeExporter commented 8 years ago
It works either way :-) 
Note that shutdownInput()/shutdownOutput() are checking 
AFUNIXSocketImpl.closed, while 
AFUNIXOutputStream.close() is setting AFUNIXOutputStream.closed to true (and 
AFUNIXOutputStream is setting AFUNIXOutputStream.closed correspondingly). So it 
still 
works, but I admit it is confusing. Perhaps it is a bit unfortunate naming of 
the 
inner class variable "closed" to alias the outer class "closed".

Original comment by tmi...@gmail.com on 4 Dec 2009 at 2:27