pfpacket / rust-9p

Tokio-based asynchronous filesystems library using 9P2000.L protocol, an extended variant of 9P from Plan 9.
BSD 3-Clause "New" or "Revised" License
124 stars 17 forks source link

Why are handlers named by what they will return? #12

Open lf94 opened 3 years ago

lf94 commented 3 years ago

If we are writing functions which are handling incoming T messages, why are using their R message names for the function names?

For example: When receiving a Tattach, why is rattach called instead of a "tattach" function, and returning Rattach message?

Maybe there is some good reason but I don't know :)

lf94 commented 3 years ago

Looking at how a few Plan 9 servers name their functions, we should use "fsmessagename" instead to keep to conventions. Considering rust-9p is 0.0.1, this change should be done sooner than later.