netty

package
v0.0.0-...-37d5b15 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 5 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, 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) 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

type ConnectManage

type ConnectManage struct {
	RemoteAddr string
	ConId      uint32
}

type IServer

type IServer interface {
	//启动服务器方法
	Start()
	//停止服务器方法
	Stop()
	//开启业务服务方法
	Serve()
}

定义服务器接口

Jump to

Keyboard shortcuts

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