Documentation ¶
Index ¶
- Constants
- type Agent
- type AgentManager
- func (m *AgentManager) Agents() map[string]*Agent
- func (m *AgentManager) Listenport() string
- func (m *AgentManager) Oneway(aid string, btype int32, data []byte, timeout time.Duration) error
- func (m *AgentManager) Twoway(aid string, btype int32, data []byte, timeout time.Duration) (int32, []byte, error)
- type FunAgClose
- type FunAgOnewaynotify
- type FunAgTwowaynotify
Constants ¶
View Source
const (
DEFAULT_SEND_TIMEOUT time.Duration = time.Millisecond * 200
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func NewAgent ¶
func NewAgent( c net.Conn, readto time.Duration, heart time.Duration, onenotify FunAgOnewaynotify, twonotify FunAgTwowaynotify, close FunAgClose, ) *Agent
func NewAgentFromAddr ¶
func NewAgentFromAddr(addr string, readtimeout time.Duration, heart time.Duration, onenotify FunAgOnewaynotify, twonotify FunAgTwowaynotify, close FunAgClose, ) (*Agent, error)
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
func NewAgentManager ¶
func NewAgentManager( addr string, readtimeout time.Duration, heart time.Duration, newagent func(*Agent), onenotify FunAgOnewaynotify, twonotify FunAgTwowaynotify, close FunAgClose, ) (*AgentManager, error)
func (*AgentManager) Agents ¶
func (m *AgentManager) Agents() map[string]*Agent
func (*AgentManager) Listenport ¶
func (m *AgentManager) Listenport() string
type FunAgClose ¶
type FunAgOnewaynotify ¶
Click to show internal directories.
Click to hide internal directories.