public class DebugReceiveChannelEndpoint extends ReceiveChannelEndpoint
connectAddress, context, errorHandler, isClosed, receiveDatagramChannel, selectionKey, sendDatagramChannel, udpChannel
Constructor and Description |
---|
DebugReceiveChannelEndpoint(UdpChannel udpChannel,
DataPacketDispatcher dispatcher,
AtomicCounter statusIndicator,
MediaDriver.Context context)
Construct a
ReceiveChannelEndpoint with defaults for loss from DebugChannelEndpointConfiguration . |
DebugReceiveChannelEndpoint(UdpChannel udpChannel,
DataPacketDispatcher dispatcher,
AtomicCounter statusIndicator,
MediaDriver.Context context,
LossGenerator dataLossGenerator,
LossGenerator controlLossGenerator)
Construct a
ReceiveChannelEndpoint with configuration for loss rate and seed. |
Modifier and Type | Method and Description |
---|---|
int |
onDataPacket(DataHeaderFlyweight header,
UnsafeBuffer buffer,
int length,
InetSocketAddress srcAddress,
int transportIndex)
Callback to handle a received data packet.
|
void |
onRttMeasurement(RttMeasurementFlyweight header,
UnsafeBuffer buffer,
int length,
InetSocketAddress srcAddress,
int transportIndex)
Callback to handle a received RTT Measurement frame.
|
void |
onSetupMessage(SetupFlyweight header,
UnsafeBuffer buffer,
int length,
InetSocketAddress srcAddress,
int transportIndex)
Callback to handle a received setup frame.
|
int |
sendTo(ByteBuffer buffer,
InetSocketAddress remoteAddress)
Send contents of
ByteBuffer to the remote address. |
addDestination, closeIndicators, closeMultiRcvDestination, decRefToStream, decRefToStreamAndSession, destination, destination, dispatcher, distinctSubscriptionCount, explicitControlAddress, hasDestination, hasDestinationControl, hasExplicitControl, hasTag, incRefToStream, incRefToStreamAndSession, indicateActive, isMulticast, isMulticast, localSocketAddressIndicator, matchesTag, multicastTtl, multicastTtl, openChannel, originalUriString, possibleTtlAsymmetryEncountered, removeDestination, send, send, sendNakMessage, sendRttMeasurement, sendRttMeasurement, sendSetupElicitingStatusMessage, sendStatusMessage, shouldBeClosed, statusIndicatorCounter, subscriptionUdpChannel, tag, udpChannel, udpChannel, updateControlAddress, validateAllowsDestinationControl
bindAddressAndPort, close, isClosed, isValidFrame, openDatagramChannel, receive, receiveDatagramChannel, receiveHook, registerForRead, sendError, sendHook, socketRcvbufLength, socketSndbufLength, updateEndpoint
public DebugReceiveChannelEndpoint(UdpChannel udpChannel, DataPacketDispatcher dispatcher, AtomicCounter statusIndicator, MediaDriver.Context context)
ReceiveChannelEndpoint
with defaults for loss from DebugChannelEndpointConfiguration
.udpChannel
- for the media.dispatcher
- for forwarding packets.statusIndicator
- for the endpoint for the channel.context
- for configuration.public DebugReceiveChannelEndpoint(UdpChannel udpChannel, DataPacketDispatcher dispatcher, AtomicCounter statusIndicator, MediaDriver.Context context, LossGenerator dataLossGenerator, LossGenerator controlLossGenerator)
ReceiveChannelEndpoint
with configuration for loss rate and seed.udpChannel
- for the media.dispatcher
- for forwarding packets.statusIndicator
- for the endpoint for the channel.context
- for configuration.dataLossGenerator
- for the random loss on the data stream.controlLossGenerator
- for the random loss on the control stream.public int sendTo(ByteBuffer buffer, InetSocketAddress remoteAddress)
ByteBuffer
to the remote address.sendTo
in class ReceiveChannelEndpoint
buffer
- to send containing the payload.remoteAddress
- to send the payload to.public int onDataPacket(DataHeaderFlyweight header, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, int transportIndex)
onDataPacket
in class ReceiveChannelEndpoint
header
- of the data first frame.buffer
- containing the data packet.length
- of the data packet.srcAddress
- from which the data packet was received.transportIndex
- on which the packet was received.public void onSetupMessage(SetupFlyweight header, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, int transportIndex)
onSetupMessage
in class ReceiveChannelEndpoint
header
- of the setup framebuffer
- containing the setup frame.length
- of the setup frame.srcAddress
- the message came from.transportIndex
- on which the message was received.public void onRttMeasurement(RttMeasurementFlyweight header, UnsafeBuffer buffer, int length, InetSocketAddress srcAddress, int transportIndex)
onRttMeasurement
in class ReceiveChannelEndpoint
header
- of the RTT Measurement framebuffer
- containing the RTT Measurement frame.length
- of the RTT Measurement frame.srcAddress
- the message came from.transportIndex
- on which the message was received.Copyright © 2014-2022 Real Logic Limited. All Rights Reserved.