Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Conn netpoll.Connection
}
func (Connection) Close ¶
func (c Connection) Close() (err error)
func (Connection) RemoteAddr ¶
func (c Connection) RemoteAddr() string
type NetPollEasyNetPlugin ¶
type NetPollEasyNetPlugin struct { Conn net.Conn Ctx context.Context Config *YamlConfig Server *NetPollServer Handler _interface.IEasyNet }
func NewNetPollEasyNetPlugin ¶
func NewNetPollEasyNetPlugin(ctx context.Context, iconfig _interface.IConfig, handler _interface.IEasyNet) *NetPollEasyNetPlugin
func (NetPollEasyNetPlugin) Run ¶
func (g NetPollEasyNetPlugin) Run() error
type NetPollServer ¶
type NetPollServer struct { Ctx context.Context InputStreamMap map[string]_interface.IInputStream ConnectionMap map[string]_interface.IConnection // contains filtered or unexported fields }
func NewNetPollServer ¶
func NewNetPollServer(ctx context.Context, config *YamlConfig, handler _interface.IEasyNet) *NetPollServer
func (*NetPollServer) Run ¶
func (s *NetPollServer) 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"` }
func (*YamlConfig) GetIp ¶
func (n *YamlConfig) GetIp() string
func (*YamlConfig) GetPort ¶
func (n *YamlConfig) GetPort() int32
func (*YamlConfig) GetProtocol ¶
func (n *YamlConfig) GetProtocol() string
Click to show internal directories.
Click to hide internal directories.