tcp

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

TCPServer

Package tcp_server created to help build TCP servers faster.

forked from github.com/firstrow/tcp_server

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(address, relay string) *server

Creates new tcp server instance

func NewWithTLS

func NewWithTLS(address, relay, certFile, 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) GetConn

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

Get 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