func (c *Connection) recvMessage(ctx context.Context, msg message, mex *messageExchange) error {
	frame, err := mex.recvPeerFrameOfType(msg.messageType())
	if err != nil {
		if err, ok := err.(errorMessage); ok {
			return err.AsSystemError()
		}
		return err
	}

	err = frame.read(msg)
	c.opts.FramePool.Release(frame)
	return err
}
func (c *Connection) recvMessage(ctx context.Context, msg message, mex *messageExchange) error {
	frame, err := mex.recvPeerFrameOfType(msg.messageType())
	if err != nil {
		if err, ok := err.(errorMessage); ok {
			return err.AsSystemError()
		}
		return err
	}

	err = frame.read(msg)
	c.opts.FramePool.Release(frame)
	return err
}
func ( c * Connection ) recvMessage ( ctx context . Context , msg message , mex * messageExchange ) error { frame , err := mex . recvPeerFrameOfType ( msg . messageType ( ) ) if err != nil { if err , ok := err . ( errorMessage ) ; ok { return err . AsSystemError ( ) } return err } err = frame . read ( msg ) c . opts . FramePool . Release ( frame ) return err }
// recvMessage blocks waiting for a standalone response message (typically a
// control message)
recvMessage blocks waiting for a standalone response message ( typically a control message )