dahlia

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 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 Client

type Client struct {
	Cipher []byte
	Closer io.Closer
	Listen string
	Server string
}

Client implemented the dahlia protocol.

func NewClient

func NewClient(listen string, server string, cipher string) *Client

NewClient returns a new Client.

func (*Client) Close

func (c *Client) Close() error

Close listener. Established connections will not be closed.

func (*Client) Run

func (c *Client) Run() error

Run it.

func (*Client) Serve

func (c *Client) Serve(ctx *daze.Context, cli net.Conn) error

Serve incoming connections. Parameter cli will be closed automatically when the function exits.

type Middle

type Middle struct {
	Closer io.Closer
	Listen string
	Server string
}

Middle implemented the dahlia protocol.

func NewMiddle

func NewMiddle(listen string, server string) *Middle

NewMiddle returns a new Middle.

func (*Middle) Close

func (m *Middle) Close() error

Close listener. Established connections will not be closed.

func (*Middle) Run

func (m *Middle) Run() error

Run it.

func (*Middle) Serve

func (m *Middle) Serve(ctx *daze.Context, cli net.Conn) error

Serve incoming connections. Parameter cli will be closed automatically when the function exits.

type Server

type Server struct {
	Cipher []byte
	Closer io.Closer
	Listen string
	Server string
}

Server implemented the dahlia protocol.

func NewServer

func NewServer(listen string, server string, cipher string) *Server

NewServer returns a new Server.

func (*Server) Close

func (s *Server) Close() error

Close listener. Established connections will not be closed.

func (*Server) Run

func (s *Server) Run() error

Run it.

func (*Server) Serve

func (s *Server) Serve(ctx *daze.Context, cli net.Conn) error

Serve incoming connections. Parameter cli will be closed automatically when the function exits.

Jump to

Keyboard shortcuts

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