Documentation
¶
Index ¶
- Constants
- Variables
- func BytesToInt(b []byte) int
- func IntToBytes(n int) []byte
- func MergeBytes(b1 []byte, b2 ...[]byte) []byte
- type Action
- type Callback
- type Client
- type Conn
- type Data
- type Message
- func (m *Message) Async() bool
- func (m *Message) BodyBytes() []byte
- func (m *Message) BodyLength() int
- func (m *Message) BodyStringify() string
- func (m *Message) Bytes() []byte
- func (m *Message) GJson() gjson.Result
- func (m *Message) Length() int
- func (m *Message) Parse(b []byte) error
- func (m *Message) Stringify() string
- func (m *Message) ToData() Data
- type Reply
- type Router
- type Server
- func (u *Server) OnClosed(c gnet.Conn, err error) (action gnet.Action)
- func (u *Server) OnInitComplete(srv gnet.Server) (action gnet.Action)
- func (u *Server) OnOpened(c gnet.Conn) (out []byte, action gnet.Action)
- func (u *Server) React(frame []byte, c gnet.Conn, out chan gnet.Out)
- func (u *Server) RecordLog()
- func (u *Server) Router() *Router
- func (u *Server) Run()
Constants ¶
View Source
const ( DefaultAntsPoolSize = 1 << 18 ExpiryDuration = 10 * time.Second Nonblocking = true )
Variables ¶
View Source
var (
ErrTimeout = errors.New("request timeout! ")
)
Functions ¶
func MergeBytes ¶
Types ¶
type Client ¶ added in v0.0.2
type Client struct {
// contains filtered or unexported fields
}
func DefaultClient ¶ added in v0.0.2
func DefaultClient() *Client
type Message ¶
type Message struct { Api string `json:"api"` Body interface{} `json:"body,omitempty"` // contains filtered or unexported fields }
func NewMessage ¶
func (*Message) BodyLength ¶ added in v0.0.5
func (*Message) BodyStringify ¶ added in v0.0.5
type Server ¶
type Server struct { *gnet.EventServer // contains filtered or unexported fields }
func DefaultServer ¶ added in v0.0.2
func DefaultServer() *Server
func (*Server) OnInitComplete ¶
Click to show internal directories.
Click to hide internal directories.