muxserver

package
v0.0.0-...-aed2fb2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

对CMux网络连接多路复用器的封装

func New

func New(network string, address string) *Server

构建一个网络多路复用器

func (*Server) Close

func (slf *Server) Close() error

关闭网络多路复用器

func (*Server) ErrorHandler

func (slf *Server) ErrorHandler(handler func(err error)) *Server

添加服务错误处理器

func (*Server) Match

func (slf *Server) Match(matcher cmux.Matcher, serve func(lister net.Listener, crash chan error)) *Server

添加匹配器

func (*Server) Serve

func (slf *Server) Serve() error

开始运行网络多路复用器

Jump to

Keyboard shortcuts

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