Documentation
¶
Overview ¶
@Title WebsocketDealer.go @Description 实现websocket低成本call 需要客户端配合 @Author Dorbmon
Index ¶
Constants ¶
View Source
const ( ModuleName = "WebsocketDealer" ModuleVersion = 0.1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StandardCall ¶
type StandardCall struct {
Function string `json:"function"`
Argument []interface{} `json:"argument"`
}
type WebsocketDealFunction ¶
type WebsocketDealFunction func(conn *Conn, arguments []interface{})
type WebsocketDealer ¶
type WebsocketDealer struct {
OriginCheck func(ctx *RWeb.Context) bool
// contains filtered or unexported fields
}
func New ¶
func New() (r WebsocketDealer)
func (*WebsocketDealer) BindFunction ¶
func (z *WebsocketDealer) BindFunction(FunctionName string, Function WebsocketDealFunction) error
func (*WebsocketDealer) Handler ¶
func (z *WebsocketDealer) Handler(context *RWeb.Context)
*
使用此函数作为引擎的绑定函数
Click to show internal directories.
Click to hide internal directories.