Documentation ¶
Index ¶
- type Connection
- func (self *Connection) Close()
- func (self *Connection) Listen(addr string, auth *proxy.Auth) error
- func (self *Connection) OnError(f func(err error))
- func (self *Connection) OnMessage(f func(message []byte))
- func (self *Connection) OnOpen(f func())
- func (self *Connection) Write(message []byte)
- func (self *Connection) WriteString(message string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { Conn net.Conn Address string Connected bool // contains filtered or unexported fields }
func New ¶
func New(address string) *Connection
func (*Connection) Close ¶
func (self *Connection) Close()
func (*Connection) OnError ¶
func (self *Connection) OnError(f func(err error))
func (*Connection) OnMessage ¶
func (self *Connection) OnMessage(f func(message []byte))
func (*Connection) OnOpen ¶
func (self *Connection) OnOpen(f func())
func (*Connection) Write ¶
func (self *Connection) Write(message []byte)
func (*Connection) WriteString ¶
func (self *Connection) WriteString(message string)
Click to show internal directories.
Click to hide internal directories.