public final class UdpNameResolutionTransport extends UdpChannelTransport
UdpChannelTransport specialised for name resolution between MediaDrivers.| Modifier and Type | Class and Description |
|---|---|
static interface |
UdpNameResolutionTransport.UdpFrameHandler
Handler for processing the received frames.
|
connectAddress, context, errorHandler, isClosed, receiveDatagramChannel, selectionKey, sendDatagramChannel, udpChannel| Constructor and Description |
|---|
UdpNameResolutionTransport(UdpChannel udpChannel,
InetSocketAddress resolverAddress,
UnsafeBuffer unsafeBuffer,
MediaDriver.Context context)
Construct a new channel transport for name resolution.
|
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
boundAddress()
The
InetSocketAddress which the resolver is bound to for listening to requests. |
static InetSocketAddress |
getInetSocketAddress(String hostAndPort,
NameResolver nameResolver)
Get the
InetSocketAddress for a host and port endpoint using the default name resolver. |
static InetSocketAddress |
getInterfaceAddress(String addressAndPort)
Get
InetSocketAddress for an interface of an address and port. |
int |
poll(UdpNameResolutionTransport.UdpFrameHandler handler,
long nowMs)
Poll the transport for received frames to be delivered to a
UdpNameResolutionTransport.UdpFrameHandler. |
int |
sendTo(ByteBuffer buffer,
InetSocketAddress remoteAddress)
Send contents of
ByteBuffer to the remote address. |
bindAddressAndPort, close, isClosed, isMulticast, isValidFrame, multicastTtl, openDatagramChannel, receive, receiveDatagramChannel, receiveHook, registerForRead, sendError, sendHook, socketRcvbufLength, socketSndbufLength, udpChannel, updateEndpointpublic UdpNameResolutionTransport(UdpChannel udpChannel, InetSocketAddress resolverAddress, UnsafeBuffer unsafeBuffer, MediaDriver.Context context)
udpChannel - associated with the transport.resolverAddress - to listen on.unsafeBuffer - for reading frames.context - for configuration.public int poll(UdpNameResolutionTransport.UdpFrameHandler handler, long nowMs)
UdpNameResolutionTransport.UdpFrameHandler.handler - for processing the frames.nowMs - current time.public int sendTo(ByteBuffer buffer, InetSocketAddress remoteAddress)
ByteBuffer to the remote address.buffer - to send containing the payload.remoteAddress - to send the payload to.public InetSocketAddress boundAddress()
InetSocketAddress which the resolver is bound to for listening to requests.InetSocketAddress which the resolver is bound to for listening to requests.public static InetSocketAddress getInterfaceAddress(String addressAndPort)
InetSocketAddress for an interface of an address and port.addressAndPort - for the endpoint.InetSocketAddress if successful or null if not.public static InetSocketAddress getInetSocketAddress(String hostAndPort, NameResolver nameResolver)
InetSocketAddress for a host and port endpoint using the default name resolver.hostAndPort - to parse.nameResolver - to resolve a name to an InetAddress.InetSocketAddress if successful or null if not.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.