Documentation ¶
Index ¶
- func InitHttpHandlers()
- func OnNewSocketConnection(f func(Socket))
- type AjaxSocket
- func (a *AjaxSocket) Close()
- func (a *AjaxSocket) IsClosed() bool
- func (a *AjaxSocket) OnClose(f func())
- func (a *AjaxSocket) OnRead(f func(string))
- func (a *AjaxSocket) RemoteAddr() string
- func (a *AjaxSocket) Type() SocketType
- func (a *AjaxSocket) UserAgent() string
- func (a *AjaxSocket) Write(data string)
- type DummySocket
- func (s *DummySocket) Close()
- func (s *DummySocket) IsClosed() bool
- func (s *DummySocket) OnClose(f func())
- func (s *DummySocket) OnRead(func(string))
- func (s *DummySocket) RemoteAddr() string
- func (s *DummySocket) Type() SocketType
- func (s *DummySocket) UserAgent() string
- func (s *DummySocket) Write(string)
- type Socket
- type SocketType
- type WebSocket
- func (w *WebSocket) Close()
- func (w *WebSocket) IsClosed() bool
- func (w *WebSocket) OnClose(f func())
- func (w *WebSocket) OnRead(f func(string))
- func (w *WebSocket) RemoteAddr() string
- func (w *WebSocket) Type() SocketType
- func (w *WebSocket) UserAgent() string
- func (w *WebSocket) Write(data string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitHttpHandlers ¶
func InitHttpHandlers()
func OnNewSocketConnection ¶
func OnNewSocketConnection(f func(Socket))
Types ¶
type AjaxSocket ¶
type AjaxSocket struct {
// contains filtered or unexported fields
}
func NewAjaxSocket ¶
func NewAjaxSocket() *AjaxSocket
func (*AjaxSocket) Close ¶
func (a *AjaxSocket) Close()
func (*AjaxSocket) IsClosed ¶
func (a *AjaxSocket) IsClosed() bool
func (*AjaxSocket) OnClose ¶
func (a *AjaxSocket) OnClose(f func())
func (*AjaxSocket) OnRead ¶
func (a *AjaxSocket) OnRead(f func(string))
func (*AjaxSocket) RemoteAddr ¶
func (a *AjaxSocket) RemoteAddr() string
func (*AjaxSocket) Type ¶
func (a *AjaxSocket) Type() SocketType
func (*AjaxSocket) UserAgent ¶
func (a *AjaxSocket) UserAgent() string
func (*AjaxSocket) Write ¶
func (a *AjaxSocket) Write(data string)
type DummySocket ¶
type DummySocket struct {
// contains filtered or unexported fields
}
func NewSocketDummy ¶
func NewSocketDummy(remoteAddr string, userAgent string) *DummySocket
func (*DummySocket) Close ¶
func (s *DummySocket) Close()
func (*DummySocket) IsClosed ¶
func (s *DummySocket) IsClosed() bool
func (*DummySocket) OnClose ¶
func (s *DummySocket) OnClose(f func())
func (*DummySocket) OnRead ¶
func (s *DummySocket) OnRead(func(string))
func (*DummySocket) RemoteAddr ¶
func (s *DummySocket) RemoteAddr() string
func (*DummySocket) Type ¶
func (s *DummySocket) Type() SocketType
func (*DummySocket) UserAgent ¶
func (s *DummySocket) UserAgent() string
func (*DummySocket) Write ¶
func (s *DummySocket) Write(string)
type SocketType ¶
type SocketType int
const ( // The socket types TypeDummySocket SocketType = 1 << iota TypeAjaxSocket SocketType = 1 << iota TypeWebSocket SocketType = 1 << iota )
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func NewWebSocket ¶
func NewWebSocket() *WebSocket
func (*WebSocket) RemoteAddr ¶
func (*WebSocket) Type ¶
func (w *WebSocket) Type() SocketType
Click to show internal directories.
Click to hide internal directories.