p9
p9 copied to clipboard
p9: introduce sessions
This is a pre-cursor to supporting 9P2000, where some messages may overlap. Sessions should allow us to change the version & message registry.
9P2000 spec / Plan 9 man page for version(5):
"If the server does not understand the client's version string, it should respond with an Rversion message (not Rerror) with the version string the 7 characters "unknown"."
"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 messages between version requests is called a session."
Signed-off-by: Chris Koch [email protected]
this obviously doesn't work. thinking about concurrency at 1am wasn't a good idea.
current status: it works, but it sucks. this is not how you do concurrency.
@sevki I pulled out everything unrelated; merged some trivial stuff. One more concurrency issue to solve (waiting for all <-sendDone's before actually changing the session). This should be just the meat of the sessions change now.