public void ThreadSendsRemoveChannelMessage() { conductor.RemovePublication(CORRELATION_ID); AssertReadsOneMessage((msgTypeId, buffer, index, length) => { RemoveMessageFlyweight message = new RemoveMessageFlyweight(); message.Wrap(buffer, index); Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_PUBLICATION)); Assert.That(message.RegistrationId(), Is.EqualTo(CORRELATION_ID)); }); }
public void ThreadSendsRemoveSubscriberMessage() { conductor.RemoveSubscription(CORRELATION_ID); AssertReadsOneMessage((msgTypeId, buffer, index, length) => { RemoveMessageFlyweight removeMessage = new RemoveMessageFlyweight(); removeMessage.Wrap(buffer, index); Assert.That(msgTypeId, Is.EqualTo(ControlProtocolEvents.REMOVE_SUBSCRIPTION)); Assert.That(removeMessage.RegistrationId(), Is.EqualTo(CORRELATION_ID)); }); }
public DriverProxy(IRingBuffer toDriverCommandBuffer) { if (toDriverCommandBuffer == null) { throw new ArgumentNullException(nameof(toDriverCommandBuffer)); } _toDriverCommandBuffer = toDriverCommandBuffer; _publicationMessage.Wrap(_buffer, 0); _subscriptionMessage.Wrap(_buffer, 0); _correlatedMessage.Wrap(_keepaliveBuffer, 0); _removeMessage.Wrap(_buffer, 0); _clientId = toDriverCommandBuffer.NextCorrelationId(); }
public DriverProxy(IRingBuffer toDriverCommandBuffer, long clientId) { if (toDriverCommandBuffer == null) { throw new ArgumentNullException(nameof(toDriverCommandBuffer)); } _toDriverCommandBuffer = toDriverCommandBuffer; _publicationMessage.Wrap(_buffer, 0); _subscriptionMessage.Wrap(_buffer, 0); _correlatedMessage.Wrap(_buffer, 0); _removeMessage.Wrap(_buffer, 0); _destinationMessage.Wrap(_buffer, 0); _correlatedMessage.ClientId(clientId); }