示例#1
0
 public static Tcp.Command Write(ByteString data, Tcp.Event ack = null)
 {
     return(Tcp.Write.Create(data, ack));
 }
 public Tcp.Write WriteCmd(Tcp.Event ack)
 {
     return(Tcp.Write.Create(ByteString.Create(new byte[TestSize]), ack));
 }
示例#3
0
        private PendingWrite CreatePendingBufferWrite(IActorRef commander, ByteString data, Tcp.Event ack, Tcp.WriteCommand tail)
        {
            var buffer = _tcp.BufferPool.Acquire();

            try
            {
                var copied = data.CopyToBuffer(buffer);
                buffer.Flip();
                return(new PendingBufferWrite(this, commander, data.Drop(copied), ack, buffer, tail));
            }
            catch (Exception)
            {
                _tcp.BufferPool.Release(buffer);
                throw;
            }
        }
示例#4
0
 public CloseInformation(ISet <IActorRef> notificationsTo, Tcp.Event closedEvent)
 {
     NotificationsTo = notificationsTo;
     ClosedEvent     = closedEvent;
 }
示例#5
0
 private PendingWrite CreatePendingBufferWrite(IActorRef commander, ByteString data, Tcp.Event ack, WriteCommand tail)
 {
     return(new PendingBufferWrite(this, SendArgs, Self, commander, data, ack, tail));
 }