public class SendChannelEndpoint extends UdpChannelTransport
NetworkPublications onto a single transport session for
sending data and setup frames plus the receiving of status and NAK frames.bindAddress, connectAddress, endPointAddress, errorLog, receiveBuffer, receiveByteBuffer, receiveDatagramChannel, selectionKey, sendDatagramChannel, transportPoller, udpChannel| Constructor and Description |
|---|
SendChannelEndpoint(UdpChannel udpChannel,
MediaDriver.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPublication(NetworkPublication publication)
Called form the
DriverConductor to associate a publication with a sessionId and streamId. |
protected int |
dispatch(org.agrona.concurrent.UnsafeBuffer buffer,
int length,
java.net.InetSocketAddress srcAddress) |
NetworkPublication |
getPublication(int streamId)
Called from the
DriverConductor to find the publication associated with a sessionId and streamId |
void |
openChannel()
Called from the
Sender to create the channel for the transport. |
java.lang.String |
originalUriString() |
int |
pollForData()
Attempt to receive waiting data.
|
protected void |
presend(java.nio.ByteBuffer buffer,
java.net.InetSocketAddress address) |
void |
registerForSend(NetworkPublication publication)
Called from the
Sender to add information to the control packet dispatcher. |
NetworkPublication |
removePublication(NetworkPublication publication)
Called from the
DriverConductor to remove an association of a publication. |
int |
send(java.nio.ByteBuffer buffer)
Send contents of a
ByteBuffer to connected address. |
int |
sessionCount()
Called from the
DriverConductor to return the number of associated publications. |
void |
unregisterForSend(NetworkPublication publication)
Called from the
Sender to remove information from the control packet dispatcher. |
close, getOption, isMulticast, isValidFrame, multicastTtl, openDatagramChannel, receive, receiveBufferCapacity, receiveDatagramChannel, registerForRead, udpChannelpublic SendChannelEndpoint(UdpChannel udpChannel, MediaDriver.Context context)
public void openChannel()
Sender to create the channel for the transport.public java.lang.String originalUriString()
public NetworkPublication getPublication(int streamId)
DriverConductor to find the publication associated with a sessionId and streamIdstreamId - for the publicationpublic void addPublication(NetworkPublication publication)
DriverConductor to associate a publication with a sessionId and streamId.publication - to associatepublic NetworkPublication removePublication(NetworkPublication publication)
DriverConductor to remove an association of a publication.publication - to removepublic int sessionCount()
DriverConductor to return the number of associated publications.public void registerForSend(NetworkPublication publication)
Sender to add information to the control packet dispatcher.publication - to add to the dispatcherpublic void unregisterForSend(NetworkPublication publication)
Sender to remove information from the control packet dispatcher.publication - to removepublic int send(java.nio.ByteBuffer buffer)
ByteBuffer to connected address.
This is used on the send size for performance over sentTo().buffer - to sendprotected void presend(java.nio.ByteBuffer buffer,
java.net.InetSocketAddress address)
public int pollForData()
UdpChannelTransportpollForData in class UdpChannelTransportprotected int dispatch(org.agrona.concurrent.UnsafeBuffer buffer,
int length,
java.net.InetSocketAddress srcAddress)
Copyright © 2014 - 2016 Real Logic Ltd. All Rights Reserved.