add SendWaitObj Fn
This commit is contained in:
@@ -449,6 +449,14 @@ func (s *ServerCommon) SendWait(c *ClientConn, key string, value MsgVal, timeout
|
||||
}, timeout)
|
||||
}
|
||||
|
||||
func (s *ServerCommon) SendWaitObj(c *ClientConn, key string, value interface{}, timeout time.Duration) (Message, error) {
|
||||
data, err := s.sequenceEn(value)
|
||||
if err != nil {
|
||||
return Message{}, err
|
||||
}
|
||||
return s.SendWait(c, key, data, timeout)
|
||||
}
|
||||
|
||||
func (s *ServerCommon) SendObjCtx(ctx context.Context, c *ClientConn, key string, val interface{}) (Message, error) {
|
||||
data, err := s.sequenceEn(val)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user