Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Conn *gev.Connection
}
func (Connection) Close ¶
func (c Connection) Close() (err error)
func (Connection) RemoteAddr ¶
func (c Connection) RemoteAddr() string
type GevEasyNetPlugin ¶
type GevEasyNetPlugin struct { Conn net.Conn Ctx context.Context Config *YamlConfig Server *GevServer Handler _interface.IEasyNet }
func NewGevEasyNetPlugin ¶
func NewGevEasyNetPlugin(ctx context.Context, iconfig _interface.IConfig, handler _interface.IEasyNet) *GevEasyNetPlugin
func (GevEasyNetPlugin) Run ¶
func (g GevEasyNetPlugin) Run() error
type GevServer ¶
type GevServer struct { Ctx context.Context InputStreamMap map[string]_interface.IInputStream ConnectioonMap map[string]_interface.IConnection // contains filtered or unexported fields }
func NewGevServer ¶
func NewGevServer(ctx context.Context, config *YamlConfig, handler _interface.IEasyNet) *GevServer
func (*GevServer) OnClose ¶
func (s *GevServer) OnClose(c *gev.Connection)
func (*GevServer) OnConnect ¶
func (s *GevServer) OnConnect(c *gev.Connection)
type YamlConfig ¶
type YamlConfig struct { Protocol string `json:"protocol" yaml:"protocol"` Ip string `json:"ip" yaml:"ip"` Port int32 `json:"port" yaml:"port"` Numloops int32 `json:"numloops" yaml:"numloops"` Reuseport bool `json:"reuseport" yaml:"reuseport"` }
func (*YamlConfig) GetIp ¶
func (n *YamlConfig) GetIp() string
func (*YamlConfig) GetNumloops ¶
func (n *YamlConfig) GetNumloops() 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
Click to show internal directories.
Click to hide internal directories.