Documentation
¶
Index ¶
- Constants
- type Server
- func (self *Server) Accept(w http.ResponseWriter, req *http.Request) *Server
- func (self *Server) CheckOrigin(b bool) *Server
- func (self *Server) Listen(addr string) *Server
- func (self *Server) MapStatic(url string, dir string) *Server
- func (self *Server) OnConnection(f func(sock *Socket)) *Server
- func (self *Server) OnError(f func(err error)) *Server
- func (self *Server) SetSocketUrl(url string) *Server
- func (self *Server) Stop()
- type Socket
- func (self *Socket) Close()
- func (self *Socket) HeartBeat(ms uint32)
- func (self *Socket) OnClose(f func())
- func (self *Socket) OnData(f func(buf []byte))
- func (self *Socket) RemoteAddr() string
- func (self *Socket) RemoteIP() string
- func (self *Socket) RemotePort() int32
- func (self *Socket) Send(buf []byte)
Constants ¶
View Source
const ( C_max_write_size = 4096 C_qw_max_size = 10000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func CreateServer ¶
func CreateServer() *Server
func (*Server) CheckOrigin ¶
func (*Server) OnConnection ¶
func (*Server) SetSocketUrl ¶
type Socket ¶
type Socket struct { MessageType int // contains filtered or unexported fields }
func (*Socket) RemoteAddr ¶
func (*Socket) RemotePort ¶
Click to show internal directories.
Click to hide internal directories.