multiple clients sharing connection

36 views
Skip to first unread message

Dieter Van Eessen

unread,
Apr 21, 2021, 3:21:20 PM4/21/21
to 9p-hackers

Hello,

9p docs state:
  1: "The client and server will use the protocol version defined by the server’s response     (Rversion) for all subsequent communication on the connection."
  2: A connection to a server is a bidirectional communication path from the client to the server. There may be a single client or multiple clients sharing the same connection.

Can multiple clients be served on a a single connection with multiple versions defined (theoretically)?

I see last topic is quite a few years old... hope to get an answer :)

kind regards,
Dieter

Eric Van Hensbergen

unread,
Apr 21, 2021, 4:33:42 PM4/21/21
to 9p-ha...@googlegroups.com
So I think the answer is no, IIRC the Tversion/Rversion is the first message and establishes the protocol revision, since there is no stateful identifier offered or returned there wouldn't be a way to disambiguate the two data streams.    If a second client sent a version command (even a non-conflicting one) it would abort the existing session and restart a new one.   http://man.cat-v.org/plan_9/5/version

Entry point for multiple clients is via auth and attach where you have afid (from auth) and fid (from attach) tokens established to disambiguate the clients from each other. 

--

---
You received this message because you are subscribed to the Google Groups "9p-hackers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 9p-hackers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/9p-hackers/24742b3a-92a4-4273-82c8-7069cdf0909en%40googlegroups.com.

Dieter Van Eessen

unread,
Apr 22, 2021, 3:56:40 PM4/22/21
to 9p-ha...@googlegroups.com
Didn't expect a clear answer so fast, thank you for that.
kind regards,
Dieter


You received this message because you are subscribed to a topic in the Google Groups "9p-hackers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/9p-hackers/qeONFXZtfTM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 9p-hackers+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/9p-hackers/CAFkjPTnkN8MguSDCjDLCTaT0khDZ8HWRsc1Mt1eb9mvnZf7gJA%40mail.gmail.com.

Charles Forsyth

unread,
Apr 22, 2021, 4:02:25 PM4/22/21
to 9p-hackers
You'd have got an answer even quicker if googlegroup's email to me to authorise your posts (won't happen again, you're authorised) had included my reply!

Not on the same connection as you describe [see version(5)]:
          A successful version request initializes the connection.
          All outstanding I/O on the connection is aborted; all active
          fids are freed (`clunked') automatically.  The set of mes-
          sages between version requests is called a session.
Also the Tversion message has the tag NOTAG, and no other client request can start until the corresponding Rversion.

In principle, Tversion might be used later to reinitialise a connection ("all outstanding i/o ... is aborted, fids are clunked etc) but a quick survey suggested you might be disappointed by several existing implementations.

Reply all
Reply to author
Forward
0 new messages