From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 14 Jul 2014 12:02:06 -0400 To: 9fans@9fans.net Message-ID: <6b8d04a332a33be230c38993122353f5@ladd.quanstro.net> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Using webfs from rc Topicbox-Message-UUID: 02f8ccce-ead9-11e9-9d60-3106f5b1d025 > that has something to do with the way how you open the connection. > > I'm not 100% sure if its a perfect description what happens, but when you > > > % echo -n url http://www.google.co.uk > ctl > > the >ctl will open and close the connection to 0/ctl. But you can read the body only while the 0/ctl device is open. (Or it might be differnet that you need to open body for reading before you open and send to ctl). > > Best is to check the code of hget to understand how this works. > > I'm not sure if it's possible or in any way convenient to use webfs through rc. I think hget is your friend. 9p file servers know which "connection" (fid) they're talking to. echo fu>bar; cat bar creates two unrelated fids. for a file server that considers each fid a unique transaction, the user needs to arrange for the same file to be used for the request and response. this can be done in rc with the <>{cmd} idiom. see rc(1). it can be a little confusing. - erik