
Fuse.Channel communicates with the FUSE kernel module. Each Channel instance is tied to a filesystem mount point.
When a channel receives a request from the kernel, it decodes the request header and emits the Channel.OnNewCommand event. The event contains one argument - an Operation. The Operation specifies which filesystem is involved, the command header, and the buffer of further data related to the request.
OnNewCommand is emitted using an asynchronous callback, so subscribers should be thread safe. TODO: this might be configureable in the future..
A Channel controls a single mount-point. Multiple Channel instances may be created and served by either a single Reactor, or multiple Reactor instances. A separate thread will be required for each Channel instance's event loop, since there is currently no support for multiplexing Channel event loops.
Public Member Functions | |
| delegate object | ProcessCommand (Operation op) |
| delegate void | SignalingEvent (Channel ch) |
| Channel (string mountPoint, FileSystem fs) | |
| bool | EventLoop () |
| void | Mount (params string[] options) |
| void | Unmount () |
Static Public Member Functions | |
| static void | Usage () |
Public Attributes | |
| event ProcessCommand | OnNewCommand |
| event SignalingEvent | ShutdownEvent |
| emitted when channel is shutting down | |
Properties | |
| string | MountPoint |
|
||||||||||||
|
Instanciate a channel for the given filesystem mount point. This tells FUSE that we will implement the filesystem at the specified mount point.
|
|
|
Waits for events, and does not return until the filesystem is unmounted. Normally this should not be used directly - see Reactor which provides a higher level interface. Returns true if exited normally. |
|
|
Command processing delegate. Process an operation and return a result object. What's done with the result will depend on its type. The following are handled:
|
|
|
abuse fuse_main to have it show usage information. Unfortunatly, libfuse will then directly call exit(), so we can't continue after this.. |
|
|
event handler for new commands.. Every time a command is received from the kernel, it is emitted using this event. |
1.4.3