public SetCredit ( int credit, bool drain, bool autoRestore = true ) : void | ||
credit | int | The new link credit. |
drain | bool | Sets the drain flag in the flow performative. |
autoRestore | bool | If true, link credit is auto-restored when a message is accepted/rejected /// by the caller. If false, caller is responsible for manage link credits. |
Результат | void |
public void SetCredit(int credit, bool drain, bool autoRestore = true)
{
this.ThrowIfDetaching("set-credit");
lock (this.ThisLock)
{
this.credit = (uint)credit;
this.autoRestore = autoRestore;
this.restored = 0;
this.SendFlow(this.deliveryCount, this.credit, drain);
}
}