evio

package
v0.0.0-...-bc856b6 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Conn evio.Conn
}

func (Connection) Close

func (c Connection) Close() (err error)

func (Connection) RemoteAddr

func (c Connection) RemoteAddr() string

func (Connection) Send

func (c Connection) Send(bs []byte) (n int, err error)

type EvioEasyNetPlugin

type EvioEasyNetPlugin struct {
	Conn net.Conn

	Ctx context.Context

	Config *YamlConfig

	Server *EvioServer

	Handler _interface.IEasyNet
}

func NewEvioEasyNetPlugin

func NewEvioEasyNetPlugin(ctx context.Context, iconfig _interface.IConfig, handler _interface.IEasyNet) *EvioEasyNetPlugin

func (EvioEasyNetPlugin) Run

func (g EvioEasyNetPlugin) Run() error

type EvioServer

type EvioServer struct {
	Ctx context.Context

	InputStreamMap map[string]_interface.IInputStream
	ConnectioonMap map[string]_interface.IConnection
	// contains filtered or unexported fields
}

func NewEvioServer

func NewEvioServer(ctx context.Context, config *YamlConfig, handler _interface.IEasyNet) *EvioServer

func (EvioServer) Run

func (s EvioServer) Run() error

type YamlConfig

type YamlConfig struct {
	Protocol  string `json:"protocol" yaml:"protocol"`
	Ip        string `json:"ip" yaml:"ip"`
	Port      int32  `json:"port" yaml:"port"`
	Reuseport bool   `json:"reuseport" yaml:"reuseport"`
	Stdlib    bool   `json:"stdlib" yaml:"stdlib"`
	Loops     int32  `json:"loops" yaml:"loops"`
}

func (*YamlConfig) GetIp

func (n *YamlConfig) GetIp() string

func (*YamlConfig) GetLoops

func (n *YamlConfig) GetLoops() int32

func (*YamlConfig) GetPort

func (n *YamlConfig) GetPort() int32

func (*YamlConfig) GetProtocol

func (n *YamlConfig) GetProtocol() string

func (*YamlConfig) GetReuseport

func (n *YamlConfig) GetReuseport() bool

func (*YamlConfig) GetStdlib

func (n *YamlConfig) GetStdlib() bool

Jump to

Keyboard shortcuts

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