Documentation ¶
Overview ¶
Package mux9p implements a multiplexer for a 9P service.
It is a port of Plan 9 Port's 9pserve program (https://9fans.github.io/plan9port/man/man4/9pserve.html) and can be used instead of 9pserve in a 9P server written in Go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listen ¶
func Listen(network, address string, srv io.ReadWriter, cfg *Config) error
Listen creates a listener at the given network and address, accepts 9P clients from it and mutiplexes them into 9P server srv.
func ListenContext ¶
func ListenContext(ctx context.Context, network, address string, srv io.ReadWriter, cfg *Config) error
ListenContext is equivalent to Listen but with a context.
Types ¶
type Config ¶
type Config struct { // No authentication. Respond to Tauth messages with an error. NoAuth bool // Logs are written here. It's set to the standard logger if nil. Logger *log.Logger // Sets the verbosity of the log. // Logs are not written if it's 0. // It can be overridden with environment variable verbose9pserve. LogLevel int // Options for the listener. ListenConfig net.ListenConfig // contains filtered or unexported fields }
Config contains options for the 9P multiplexer.
Click to show internal directories.
Click to hide internal directories.