qclient

package
v0.0.0-...-0d07254 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2025 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAdapter    = errors.New("invalid adapter")
	ErrInvalidRandom     = errors.New("invalid random")
	ErrInvalidDeviceType = errors.New("invalid device type")
)
View Source
var (
	ErrInvalidServerInstance = errors.New("invalid server instance")
	ErrInvalidTextType       = errors.New("text type cannot be unknown")
)

Functions

func NewBuilder

func NewBuilder() *clientBuilder

Types

type Client

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

Client discover, creates and manages connections to other servers.

func (*Client) ListServers

func (c *Client) ListServers(ctx context.Context) (chan ServerInstance, error)

Looking for other quick share servers and sends their instances to created chan

func (*Client) SendFiles

func (c *Client) SendFiles(
	ctx context.Context,
	instance ServerInstance,
	files []qshare.FilePayload,
) error

Establishes connection to specified server and sends provided files.

func (*Client) SendText

func (c *Client) SendText(
	ctx context.Context,
	instance ServerInstance,
	text string,
	t qshare.TextType,
) error

Establishes connection to specified server and sends provided text.

type ServerInstance

type ServerInstance struct {
	Hostname string
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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