Documentation ¶
Index ¶
- func CheckOrigin(_ *http.Request) bool
- func GetNetListener(address, certFile, keyFile string) (net.Listener, error)
- type Component
- type TCPConnector
- type TcpConn
- type WSConn
- func (c *WSConn) Close() error
- func (c *WSConn) GetNextMessage() (b []byte, err error)
- func (c *WSConn) LocalAddr() net.Addr
- func (c *WSConn) Read(b []byte) (int, error)
- func (c *WSConn) RemoteAddr() net.Addr
- func (c *WSConn) SetDeadline(t time.Time) error
- func (c *WSConn) SetReadDeadline(t time.Time) error
- func (c *WSConn) SetWriteDeadline(t time.Time) error
- func (c *WSConn) Write(b []byte) (int, error)
- type WSConnector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Component ¶ added in v1.1.0
Component (连接器组件适用于前端节点)
func NewComponent ¶ added in v1.1.5
func NewComponent(connector facade.IConnector) *Component
func (*Component) OnAfterInit ¶ added in v1.1.0
func (c *Component) OnAfterInit()
func (*Component) OnConnect ¶ added in v1.1.5
func (c *Component) OnConnect(listener ...facade.OnConnectListener)
type TCPConnector ¶
type TCPConnector struct {
// contains filtered or unexported fields
}
func NewTCP ¶ added in v1.1.0
func NewTCP(address string) *TCPConnector
func NewTCPLTS ¶ added in v1.1.0
func NewTCPLTS(address, certFile, keyFile string) *TCPConnector
func (*TCPConnector) OnConnect ¶
func (t *TCPConnector) OnConnect(listener ...cherryFacade.OnConnectListener)
func (*TCPConnector) OnStart ¶ added in v1.1.0
func (t *TCPConnector) OnStart()
func (*TCPConnector) OnStop ¶ added in v1.1.0
func (t *TCPConnector) OnStop()
OnStop stops the connector
type TcpConn ¶ added in v1.1.27
func (*TcpConn) GetNextMessage ¶ added in v1.1.27
type WSConn ¶ added in v1.1.27
type WSConn struct {
// contains filtered or unexported fields
}
WSConn is an adapter to t.INetConn, which implements all t.INetConn interface base on *websocket.INetConn
func (*WSConn) GetNextMessage ¶ added in v1.1.27
GetNextMessage reads the next message available in the stream
func (*WSConn) RemoteAddr ¶ added in v1.1.27
func (*WSConn) SetDeadline ¶ added in v1.1.27
func (*WSConn) SetReadDeadline ¶ added in v1.1.27
func (*WSConn) SetWriteDeadline ¶ added in v1.1.27
type WSConnector ¶ added in v1.1.0
type WSConnector struct {
// contains filtered or unexported fields
}
func NewWS ¶ added in v1.1.0
func NewWS(address string) *WSConnector
func NewWebsocketLTS ¶ added in v1.1.0
func NewWebsocketLTS(address, certFile, keyFile string) *WSConnector
func (*WSConnector) OnConnect ¶ added in v1.1.0
func (w *WSConnector) OnConnect(listener ...cherryFacade.OnConnectListener)
func (*WSConnector) OnStart ¶ added in v1.1.0
func (w *WSConnector) OnStart()
func (*WSConnector) OnStop ¶ added in v1.1.0
func (w *WSConnector) OnStop()
func (*WSConnector) ServeHTTP ¶ added in v1.1.0
func (w *WSConnector) ServeHTTP(rw http.ResponseWriter, r *http.Request)
ServerHTTP server.Handler
Click to show internal directories.
Click to hide internal directories.