mux9p

package module
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 11 Imported by: 2

README

mux9p Go Reference Go Report Card

Overview

This is a Go package for multiplexing a 9P service. It's a port of 9pserve.

Installation

go get github.com/fhs/mux9p

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 Do

func Do(ln net.Listener, srv io.ReadWriter, cfg *Config) error

Do accepts 9P clients from listener ln and mutiplexes them into 9P server srv.

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.

Directories

Path Synopsis
cmd
9pserve
This program announces and multiplexes a 9P service.
This program announces and multiplexes a 9P service.
internal
p9p
Package p9p implements some Plan 9 Port functions.
Package p9p implements some Plan 9 Port functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL