pht

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Host          string
	Client        *http.Client
	AuthorizePath string
	PushPath      string
	PullPath      string
	TLSEnabled    bool
	Logger        logger.Logger
}

func (*Client) Dial

func (c *Client) Dial(ctx context.Context, addr string) (net.Conn, error)

type Server

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

TODO: remove stale clients from conns

func NewHTTP3Server

func NewHTTP3Server(addr string, quicConfig *quic.Config, opts ...ServerOption) *Server

func NewServer

func NewServer(addr string, opts ...ServerOption) *Server

func (*Server) Accept

func (s *Server) Accept() (conn net.Conn, err error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

type ServerOption

type ServerOption func(opts *serverOptions)

func BacklogServerOption

func BacklogServerOption(backlog int) ServerOption

func EnableTLSServerOption

func EnableTLSServerOption(enable bool) ServerOption

func LoggerServerOption

func LoggerServerOption(logger logger.Logger) ServerOption

func MPTCPServerOption

func MPTCPServerOption(mptcp bool) ServerOption

func PathServerOption

func PathServerOption(authorizePath, pushPath, pullPath string) ServerOption

func ReadBufferSizeServerOption

func ReadBufferSizeServerOption(n int) ServerOption

func ReadTimeoutServerOption

func ReadTimeoutServerOption(timeout time.Duration) ServerOption

func TLSConfigServerOption

func TLSConfigServerOption(tlsConfig *tls.Config) ServerOption

Jump to

Keyboard shortcuts

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