Documentation ¶
Overview ¶
* @Author: your name * @Date: 2021-10-19 17:41:17 * @LastEditTime: 2021-11-04 17:05:48 * @LastEditors: Please set LastEditors * @Description: In User Settings Edit * @FilePath: /components/gxynet/conn/endpoint.go
Index ¶
- type BaseEventHandler
- type CoreBundle
- type Endpoint
- type EventHandler
- type TcpEndpoint
- func (t *TcpEndpoint) Close(ctx context.Context, err error)
- func (t *TcpEndpoint) Conn() net.Conn
- func (t *TcpEndpoint) GetData() interface{}
- func (t *TcpEndpoint) IsClosed() bool
- func (t *TcpEndpoint) Send(msg interface{}) error
- func (t *TcpEndpoint) SetData(d interface{})
- func (t *TcpEndpoint) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseEventHandler ¶
type BaseEventHandler struct { }
func (*BaseEventHandler) OnError ¶
func (e *BaseEventHandler) OnError(context.Context, Endpoint, error)
type CoreBundle ¶
type CoreBundle struct { *processor.Processor Handler EventHandler }
func (*CoreBundle) BindHandler ¶
func (p *CoreBundle) BindHandler(handler EventHandler)
func (*CoreBundle) BindProc ¶
func (p *CoreBundle) BindProc(c *gxyconfig.Configuration) error
type EventHandler ¶
type TcpEndpoint ¶
type TcpEndpoint struct { CoreBundle // contains filtered or unexported fields }
func NewTcpEndPoint ¶
func NewTcpEndPoint(conn net.Conn, bundle CoreBundle) *TcpEndpoint
func (*TcpEndpoint) Conn ¶
func (t *TcpEndpoint) Conn() net.Conn
func (*TcpEndpoint) GetData ¶
func (t *TcpEndpoint) GetData() interface{}
func (*TcpEndpoint) IsClosed ¶
func (t *TcpEndpoint) IsClosed() bool
func (*TcpEndpoint) Send ¶
func (t *TcpEndpoint) Send(msg interface{}) error
func (*TcpEndpoint) SetData ¶
func (t *TcpEndpoint) SetData(d interface{})
Click to show internal directories.
Click to hide internal directories.