Documentation ¶
Index ¶
- func AutoAuthenticate(connectClient Connect, user *string, pass *string)
- func AutoConnect(connectClient Connect, addr *string, done chan bool)
- func NewCodecRegistry(connectClient Connect) (codec *packet.PacketCodecRegistry)
- func PasswordAndSaltHash(password string, passwordSalt string) (val string)
- func Sha1Hex(str string) (val string)
- type Connect
- type ConnectImpl
- func (this *ConnectImpl) Connect(addr string) (err error)
- func (this *ConnectImpl) Connected() (val bool)
- func (this *ConnectImpl) Disconnect()
- func (this *ConnectImpl) DispatchResult(sequenceId int32, statusCode uint8, result connect.Result) (err error)
- func (this *ConnectImpl) ErrorCaught(err error)
- func (this *ConnectImpl) HandlePacket(packet packet.Packet) (err error)
- func (this *ConnectImpl) Request(request connect.Request) (statusCode uint8, result connect.Result, err error)
- func (this *ConnectImpl) RequestIdBySequenceId(sequenceId int32) (requestId int)
- func (this *ConnectImpl) RequestLater(request connect.Request, callback RequestCallback) (err error)
- func (this *ConnectImpl) Write(packet packet.Packet) (err error)
- type Event
- type EventDispatcher
- type EventHandler
- type EventMessage
- type EventRedirect
- type EventServer
- type RequestCallback
- type RequestRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoAuthenticate ¶
func AutoConnect ¶
func NewCodecRegistry ¶
func NewCodecRegistry(connectClient Connect) (codec *packet.PacketCodecRegistry)
func PasswordAndSaltHash ¶
Types ¶
type Connect ¶
type Connect interface { Connect(addr string) (err error) Disconnect() Connected() bool Request(request connect.Request) (statusCode uint8, result connect.Result, err error) RequestLater(request connect.Request, callback RequestCallback) (err error) DispatchResult(sequenceId int32, statusCode uint8, result connect.Result) (err error) RequestIdBySequenceId(sequenceId int32) int RegisterEvent(name string, eventHandler EventHandler) DispatchEvent(name string, event Event) }
type ConnectImpl ¶
type ConnectImpl struct { EventDispatcher // contains filtered or unexported fields }
func NewConnectImpl ¶
func NewConnectImpl() (this *ConnectImpl)
func (*ConnectImpl) Connect ¶
func (this *ConnectImpl) Connect(addr string) (err error)
func (*ConnectImpl) Connected ¶
func (this *ConnectImpl) Connected() (val bool)
func (*ConnectImpl) Disconnect ¶
func (this *ConnectImpl) Disconnect()
func (*ConnectImpl) DispatchResult ¶
func (*ConnectImpl) ErrorCaught ¶
func (this *ConnectImpl) ErrorCaught(err error)
func (*ConnectImpl) HandlePacket ¶
func (this *ConnectImpl) HandlePacket(packet packet.Packet) (err error)
func (*ConnectImpl) RequestIdBySequenceId ¶
func (this *ConnectImpl) RequestIdBySequenceId(sequenceId int32) (requestId int)
func (*ConnectImpl) RequestLater ¶
func (this *ConnectImpl) RequestLater(request connect.Request, callback RequestCallback) (err error)
type EventDispatcher ¶
type EventDispatcher struct {
// contains filtered or unexported fields
}
func (*EventDispatcher) DispatchEvent ¶
func (this *EventDispatcher) DispatchEvent(name string, event Event)
func (*EventDispatcher) RegisterEvent ¶
func (this *EventDispatcher) RegisterEvent(name string, eventHandler EventHandler)
type EventHandler ¶
type EventHandler func(event Event)
type EventMessage ¶
func WrapEventMessage ¶
func WrapEventMessage(packet *connect.PacketMessageEvent) (this *EventMessage)
type EventRedirect ¶
func WrapEventRedirect ¶
func WrapEventRedirect(packet *connect.PacketRedirectEvent) (this *EventRedirect)
type EventServer ¶
func WrapEventServer ¶
func WrapEventServer(packet *connect.PacketServerEvent) (this *EventServer)
type RequestCallback ¶
type RequestRecord ¶
type RequestRecord struct {
// contains filtered or unexported fields
}
func NewRequestRecord ¶
func NewRequestRecord(request connect.Request, callback RequestCallback) (this *RequestRecord)
Click to show internal directories.
Click to hide internal directories.