ncclient

package
v0.0.0-...-29e8fbe Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2019 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 {
	Connection net.Conn
	Encoder    *gob.Encoder
	Decoder    *gob.Decoder
}

Client that connects to a server

func Connect

func Connect(host string, port uint16) (*Client, error)

Connect to a listening server

func Listen

func Listen(port uint16) (*Client, error)

Listen returns a new Server struct with an open, listening connection

func (*Client) GetNextMessage

func (c *Client) GetNextMessage(v interface{}) error

GetNextMessage gob decodes the next available message sent by the client

func (*Client) SendFile

func (c *Client) SendFile(file *ncproto.File, wg *sync.WaitGroup, conf *ncproto.Config)

SendFile will send an entire File to the server

func (*Client) SendMessage

func (c *Client) SendMessage(msg ncproto.INetCopyMessage) error

SendMessage sends a gob encoded message

Jump to

Keyboard shortcuts

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