bootstrap

package
v0.0.0-...-f9ca3e1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	//必须实现方法,返回进出站类型
	IsInbound(shuju Pipemess) bool
	//必须实现方法,数据处理类
	Dispose(client net.Conn, mypipe *Pipe, shuju Pipemess) Pipemess
}

type Pipe

type Pipe struct {
	Handlers  []Handler
	Outmess   chan Pipemess
	IsSurvive bool
}

func GetPipeline

func GetPipeline() Pipe

func (*Pipe) AddHeadler

func (p *Pipe) AddHeadler(h Handler)

func (*Pipe) Close

func (p *Pipe) Close()

func (*Pipe) Start

func (p *Pipe) Start(client net.Conn)

func (Pipe) Write

func (p Pipe) Write(data []byte)

type Pipemess

type Pipemess struct {
	IsInbound bool
	Value     interface{}
}

type ServerBootstrap

type ServerBootstrap struct {
	Post   string
	Mypipe Pipe
}

func (*ServerBootstrap) SetPipe

func (server *ServerBootstrap) SetPipe(mypipe Pipe)

func (*ServerBootstrap) SetPort

func (server *ServerBootstrap) SetPort(post string)

func (ServerBootstrap) Strat

func (server ServerBootstrap) Strat()

Jump to

Keyboard shortcuts

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