Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcceptorOption ¶
type AcceptorOption func(*acceptorOptions)
func WithLinkChanSize ¶
func WithLinkChanSize(size int) AcceptorOption
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) Documentation ¶
Documentation returns handler and remotes docum/7entacion
func (*App) OnHandShaken ¶
OnHandShaken 暴露一个OnConnected()事件暂时没有看到很大的意义,因为handshake必须是第一个消息 如果需要接入握手事件的话, 可以自己注册OnHandShaken事件
type AppOption ¶
type AppOption func(*appOptions)
func WithHeartbeatInterval ¶
type IServeMux ¶
type IServeMux interface {
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
}
type TcpAcceptor ¶
type TcpAcceptor struct {
// contains filtered or unexported fields
}
func NewTcpAcceptor ¶
func NewTcpAcceptor(address string, opts ...AcceptorOption) *TcpAcceptor
func (*TcpAcceptor) Close ¶
func (my *TcpAcceptor) Close() error
func (*TcpAcceptor) GetLinkChan ¶
func (my *TcpAcceptor) GetLinkChan() chan road.Link
type WsAcceptor ¶
type WsAcceptor struct {
// contains filtered or unexported fields
}
func NewWsAcceptor ¶
func NewWsAcceptor(serveMux IServeMux, servePath string, opts ...AcceptorOption) *WsAcceptor
func (*WsAcceptor) GetLinkChan ¶
func (my *WsAcceptor) GetLinkChan() chan road.Link
func (*WsAcceptor) ServeHTTP ¶
func (my *WsAcceptor) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.