p9 icon indicating copy to clipboard operation
p9 copied to clipboard

p9: introduce sessions

Open hugelgupf opened this issue 4 years ago • 3 comments

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]

hugelgupf avatar Jul 27 '20 07:07 hugelgupf

this obviously doesn't work. thinking about concurrency at 1am wasn't a good idea.

hugelgupf avatar Jul 27 '20 09:07 hugelgupf

current status: it works, but it sucks. this is not how you do concurrency.

hugelgupf avatar Jul 28 '20 05:07 hugelgupf

@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.

hugelgupf avatar Jul 28 '20 06:07 hugelgupf