Documentation ¶
Index ¶
- Constants
- func ListenAndServe(addr string, handler Handler) error
- func LocalIP() (internet net.IP, intranet net.IP)
- func NewUUID() string
- func SetConnectTimeout(conn net.Conn, readTimeout, writeTimeout time.Duration) net.Conn
- type Handler
- type HandlerFunc
- type NodeInfo
- type Request
- type Server
- type Session
Constants ¶
View Source
const ( // 注册 MethodRegister = 1 // 准备接收任务 MethodConn = 2 )
View Source
const (
Delim = '\n'
)
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
Types ¶
type HandlerFunc ¶
For quickly defining Handler
type NodeInfo ¶ added in v0.0.3
type Request ¶ added in v0.0.3
type Request struct { ServiceId string `json:"serviceId"` // connect | register Method int `json:"method"` Attachment json.RawMessage `json:"attachment"` }
type Server ¶
func (*Server) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.