server

package
v0.0.0-...-bdf12fe Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileServer

type FileServer struct {
	Address    string
	TLSConfig  *tls.Config
	QuicConfig *quic.Config
	Sessions   map[int64]*quic.Session
	Listener   quic.Listener
	Ctx        context.Context
}

FileServer ..

func NewFileServer

func NewFileServer(address string, tlsConfig *tls.Config, quicConfig *quic.Config) *FileServer

NewFileServer ..

func (*FileServer) Run

func (s *FileServer) Run() error

Run ..

type SessionHandler

type SessionHandler struct {
	Ctx     context.Context
	Session quic.Session
	Streams map[int64]*StreamHandler
}

SessionHandler ..

func NewSessionHandler

func NewSessionHandler(session *quic.Session) *SessionHandler

NewSessionHandler ..

func (*SessionHandler) Run

func (h *SessionHandler) Run()

Run ..

type StreamHandler

type StreamHandler struct {
	Ctx    context.Context
	Stream quic.Stream
	Reader io.Reader
	Writer io.Writer
}

StreamHandler ..

func NewStreamHandler

func NewStreamHandler(stream *quic.Stream) *StreamHandler

NewStreamHandler ..

func (*StreamHandler) Run

func (h *StreamHandler) Run()

Run ..

type WriteCounter

type WriteCounter struct {
	Total        uint64
	ExpectedSize uint64
}

WriteCounter ..

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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