muxserver

package
v0.0.0-...-c1f2aa7 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 7 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
}

Server is a DRPC server that handles multiplexed streams

func New

func New(handler drpc.Handler) *Server

New returns a new multiplexed Server that serves handler

func NewWithOptions

func NewWithOptions(handler drpc.Handler, opts drpcserver.Options) *Server

NewWithOptions is the same as New but passes options to DRPC

func (*Server) Serve

func (s *Server) Serve(ctx context.Context, ln net.Listener) error

Serve listens on the given listener and handles all multiplexed streams.

func (*Server) ServeOne

func (s *Server) ServeOne(ctx context.Context, conn io.ReadWriteCloser) error

ServeOne serves a single set of rpcs on the provided transport.

Jump to

Keyboard shortcuts

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