public void RespondWith(RequestResponseContext context, object response, bool closeFollowing) { var textResponse = response.ToString(); if (!string.IsNullOrEmpty(textResponse)) { var buffer = new BasicConsumerByteBuffer(0, textResponse.Length + 1024) .Put(Converters.TextToBytes(textResponse)).Flip(); RespondWith(context, buffer, closeFollowing); } }
public void Abandon(RequestResponseContext context) { if (!_actor.IsStopped) { Action <IResponseSenderChannel> cons8585439 = __ => __.Abandon(context); if (_mailbox.IsPreallocated) { _mailbox.Send(_actor, cons8585439, null, AbandonRepresentation1); } else { _mailbox.Send( new LocalMessage <IResponseSenderChannel>(_actor, cons8585439, AbandonRepresentation1)); } } else { _actor.DeadLetters?.FailedDelivery(new DeadLetter(_actor, AbandonRepresentation1)); } }
public void RespondWith(RequestResponseContext context, Message.IConsumerByteBuffer buffer, bool closeFollowing) { if (!_actor.IsStopped) { Action <IResponseSenderChannel> cons829071244 = __ => __.RespondWith(context, buffer, closeFollowing); if (_mailbox.IsPreallocated) { _mailbox.Send(_actor, cons829071244, null, RespondWithRepresentation3); } else { _mailbox.Send(new LocalMessage <IResponseSenderChannel>(_actor, cons829071244, RespondWithRepresentation3)); } } else { _actor.DeadLetters?.FailedDelivery(new DeadLetter(_actor, RespondWithRepresentation3)); } }
public void RespondWith(RequestResponseContext context, object response, bool closeFollowing) { if (!_actor.IsStopped) { Action <IResponseSenderChannel> cons1528567494 = __ => __.RespondWith(context, response, closeFollowing); if (_mailbox.IsPreallocated) { _mailbox.Send(_actor, cons1528567494, null, RespondWithRepresentation4); } else { _mailbox.Send(new LocalMessage <IResponseSenderChannel>(_actor, cons1528567494, RespondWithRepresentation4)); } } else { _actor.DeadLetters?.FailedDelivery(new DeadLetter(_actor, RespondWithRepresentation4)); } }
public void RespondWith(RequestResponseContext context, IConsumerByteBuffer buffer, bool closeFollowing) { ((Context)context).QueueWritable(buffer); ((Context)context).RequireExplicitClose(!closeFollowing); }
public void RespondWith(RequestResponseContext context, IConsumerByteBuffer buffer) => RespondWith(context, buffer, false);
public void Abandon(RequestResponseContext context) => ((Context)context).Close();