lconnect

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server

func Server(addr string, keepAlive time.Duration, maker HandlerMaker) error

Types

type Client

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

func NewClient

func NewClient(addr string, keepAlive time.Duration) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Read

func (c *Client) Read() ([]byte, bool)

func (*Client) Write

func (c *Client) Write(data []byte) bool

type Handler

type Handler interface {
	OnMessage([]byte) ([]byte, error)
}

type HandlerMaker

type HandlerMaker func() Handler

Jump to

Keyboard shortcuts

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