9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Using webfs from rc
Date: Mon, 14 Jul 2014 12:02:06 -0400	[thread overview]
Message-ID: <6b8d04a332a33be230c38993122353f5@ladd.quanstro.net> (raw)
In-Reply-To: <d1653d4f8ba9520bfb2ab9adc47483e0@krabbe.dyndns.org>

> 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



  parent reply	other threads:[~2014-07-14 16:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14 12:08 Riddler
2014-07-14 12:27 ` Ingo Krabbe
2014-07-14 15:08   ` Stanley Lieber
2014-07-14 16:02   ` erik quanstrom [this message]
2014-07-14 16:56     ` Riddler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6b8d04a332a33be230c38993122353f5@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).