tcpclient

package
v0.0.0-...-46eaf65 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 5 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 {
	Name string
	Ip   string
	Port int
	// contains filtered or unexported fields
}

func (*Client) Start

func (c *Client) Start() error

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Write

func (c *Client) Write(bytes []byte)

type Router

type Router interface {
	Read([]byte)
	Connection()
	Disconnection()
}

type TcpClient

type TcpClient interface {
	Start() error
	Stop()
	Write([]byte)
}

func NewClient

func NewClient(name string, ip string, port int, router Router) TcpClient

Jump to

Keyboard shortcuts

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