example

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoClient

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

EchoClient echo client

func NewEchoClient

func NewEchoClient(serverAddr string) (*EchoClient, error)

NewEchoClient new client

func (*EchoClient) ReadLoop

func (c *EchoClient) ReadLoop() error

ReadLoop read loop

func (*EchoClient) SendMsg

func (c *EchoClient) SendMsg(msg string) error

SendMsg send msg to server

type EchoServer

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

EchoServer echo server

func NewEchoServer

func NewEchoServer(addr string) *EchoServer

NewEchoServer create new server

func (*EchoServer) Start added in v1.0.0

func (s *EchoServer) Start() error

Start start

func (*EchoServer) Stop added in v1.8.0

func (s *EchoServer) Stop() error

Stop stop

Jump to

Keyboard shortcuts

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