From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 18 Feb 2013 13:39:11 -0800 Message-ID: From: Skip Tavakkolian To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] two questions about go in Plan 9 Topicbox-Message-UUID: 19aaf90c-ead8-11e9-9d60-3106f5b1d025 i think linux and windows both distinguish between allowing io to complete or not via shutdown() and close() respectively (close causes a RST instead of FIN). if my understanding is correct, then: netFD.CloseRead and CloseWrite for Plan 9 will work by just closing the ctl and data fd's; netFD.Close should write "hangup" to ctl and SetLinger could easily be implemented (it returns EPLAN9 on the Go version I'm using -- tip from a few days ago). -Skip On Mon, Feb 18, 2013 at 11:04 AM, Nemo wrote: > yes. that was the problem. > perhaps exporting hangup would be > fine. > > or perhaps a close in a tcp stream > should also interrupt the reader in > plan9, if any. > > thanks > > On Feb 18, 2013, at 7:58 PM, akumar@mail.nanosouffle.net wrote: > >> In order to deal with Conn types, you're supposed to just >> use the interface's functions. Unfortunately, Conn's >> Close() simply closes the associated fd. I think in general, >> this is fine. For the Listener, a Close() will do the hangup. >> >> I'm updating the net package implementation for Plan 9, >> so new ideas are welcome in this phase. We can try to >> export a Hangup() function for Plan 9 for the Conn type >> (or for individual implementations of the type). >> >> On 18 February 2013 10:12, Francisco J Ballesteros wrote: >>> I know, but, what's the std way to do that in go in plan 9? >>> >>> On Feb 18, 2013, at 7:07 PM, cinap_lenrek@gmx.de wrote: >>> >>>> network connections on plan9 can be hanged up by writing "hangup" into >>>> the corresponding ctl file. >>>> >>>> -- >>>> cinap >>>> >>>> [/mail/box/nemo/msgs/201302/897] >> >> [/mail/box/nemo/msgs/201302/902] >