|
|
@ -17,6 +17,7 @@ type Server interface {
|
|
|
|
SendObj(c *ClientConn, key string, val interface{}) error
|
|
|
|
SendObj(c *ClientConn, key string, val interface{}) error
|
|
|
|
Send(c *ClientConn, key string, value MsgVal) error
|
|
|
|
Send(c *ClientConn, key string, value MsgVal) error
|
|
|
|
SendWait(c *ClientConn, key string, value MsgVal, timeout time.Duration) (Message, error)
|
|
|
|
SendWait(c *ClientConn, key string, value MsgVal, timeout time.Duration) (Message, error)
|
|
|
|
|
|
|
|
SendWaitObj(c *ClientConn, key string, value interface{}, timeout time.Duration) (Message, error)
|
|
|
|
SendCtx(ctx context.Context, c *ClientConn, key string, value MsgVal) (Message, error)
|
|
|
|
SendCtx(ctx context.Context, c *ClientConn, key string, value MsgVal) (Message, error)
|
|
|
|
Reply(m Message, value MsgVal) error
|
|
|
|
Reply(m Message, value MsgVal) error
|
|
|
|
pushMessage([]byte, string)
|
|
|
|
pushMessage([]byte, string)
|
|
|
@ -35,12 +36,11 @@ type Server interface {
|
|
|
|
GetClientLists() []*ClientConn
|
|
|
|
GetClientLists() []*ClientConn
|
|
|
|
GetClientAddrs() []net.Addr
|
|
|
|
GetClientAddrs() []net.Addr
|
|
|
|
|
|
|
|
|
|
|
|
GetSequenceEn() func(interface{}) ([]byte,error)
|
|
|
|
GetSequenceEn() func(interface{}) ([]byte, error)
|
|
|
|
SetSequenceEn(func(interface{}) ([]byte,error))
|
|
|
|
SetSequenceEn(func(interface{}) ([]byte, error))
|
|
|
|
GetSequenceDe() func([]byte) (interface{}, error)
|
|
|
|
GetSequenceDe() func([]byte) (interface{}, error)
|
|
|
|
SetSequenceDe(func([]byte) (interface{}, error))
|
|
|
|
SetSequenceDe(func([]byte) (interface{}, error))
|
|
|
|
|
|
|
|
|
|
|
|
HeartbeatTimeoutSec()int64
|
|
|
|
HeartbeatTimeoutSec() int64
|
|
|
|
SetHeartbeatTimeoutSec(int64)
|
|
|
|
SetHeartbeatTimeoutSec(int64)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|