tcp

package
v0.0.0-...-b2d2174 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(address string) *server

Creates new tcp server instance

func NewWithTLS

func NewWithTLS(address string, certFile string, keyFile string) *server

Types

type Client

type Client struct {
	Server *server
	// contains filtered or unexported fields
}

Client holds info about connection

func (*Client) Close

func (c *Client) Close() error

func (*Client) Conn

func (c *Client) Conn() net.Conn

func (*Client) Send

func (c *Client) Send(message string) error

Send text message to client

func (*Client) SendBytes

func (c *Client) SendBytes(b []byte) error

Send bytes to client

Jump to

Keyboard shortcuts

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