Documentation ¶
Index ¶
- Constants
- Variables
- func ClientRequest()
- type MessageHandler
- func (h *MessageHandler) OnClose(session getty.Session)
- func (h *MessageHandler) OnCron(session getty.Session)
- func (h *MessageHandler) OnError(session getty.Session, err error)
- func (h *MessageHandler) OnMessage(session getty.Session, pkg interface{})
- func (h *MessageHandler) OnOpen(session getty.Session) error
- type PackageHandler
Constants ¶
View Source
const ( CronPeriod = 20e9 WritePkgTimeout = 1e8 )
Variables ¶
View Source
var (
Sessions []getty.Session
)
Functions ¶
func ClientRequest ¶
func ClientRequest()
Types ¶
type MessageHandler ¶
type MessageHandler struct {
SessionOnOpen func(session getty.Session)
}
func (*MessageHandler) OnClose ¶
func (h *MessageHandler) OnClose(session getty.Session)
func (*MessageHandler) OnCron ¶
func (h *MessageHandler) OnCron(session getty.Session)
func (*MessageHandler) OnError ¶
func (h *MessageHandler) OnError(session getty.Session, err error)
func (*MessageHandler) OnMessage ¶
func (h *MessageHandler) OnMessage(session getty.Session, pkg interface{})
func (*MessageHandler) OnOpen ¶
func (h *MessageHandler) OnOpen(session getty.Session) error
type PackageHandler ¶
type PackageHandler struct{}
func (*PackageHandler) Read ¶
func (h *PackageHandler) Read(ss getty.Session, data []byte) (interface{}, int, error)
func (*PackageHandler) Write ¶
func (h *PackageHandler) Write(ss getty.Session, p interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.