Top Description Inners Fields Constructors Methods
io.netty.channel.epoll

pack-priv final Class NativeDatagramPacketArray

extends Object
Class Inheritance
Imports
io.netty.buffer.ByteBuf, io.netty.channel.ChannelOutboundBuffer, .ChannelOutboundBuffer.MessageProcessor, io.netty.channel.socket.DatagramPacket, io.netty.channel.unix.IovArray, .Limits, .SegmentedDatagramPacket, io.netty.util.internal.UnstableApi, java.net.Inet6Address, .InetAddress, .InetSocketAddress, .UnknownHostException

Support sendmmsg(...) on linux with GLIBC 2.14+

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
public class
NativeDatagramPacketArray.NativeDatagramPacket

Used to pass needed data to JNI.

Field Summary

Modifier and TypeField and Description
private int
private final IovArray
private final byte[]
private final NativeDatagramPacketArray.NativeDatagramPacket[]
private final NativeDatagramPacketArray.MyMessageProcessor

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
add(ChannelOutboundBuffer buffer, boolean connected, int maxMessagesPerWrite)

private boolean
add0(ByteBuf buf, int index, int len, int segmentLen, InetSocketAddress recipient)

pack-priv boolean
addWritable(ByteBuf buf, int index, int len)

pack-priv void
pack-priv int
count()

Returns the count

private static InetSocketAddress
newAddress(byte[] addr, int addrLen, int port, int scopeId, byte[] ipv4Bytes)

pack-priv NativeDatagramPacketArray.NativeDatagramPacket[]
packets()

Returns an array with count() NativeDatagramPackets filled.

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int count
iovArrayback to summary
private final IovArray iovArray
ipv4Bytesback to summary
private final byte[] ipv4Bytes
packetsback to summary
private final NativeDatagramPacketArray.NativeDatagramPacket[] packets
processorback to summary
private final NativeDatagramPacketArray.MyMessageProcessor processor

Constructor Detail

NativeDatagramPacketArrayback to summary
pack-priv NativeDatagramPacketArray()

Method Detail

addback to summary
pack-priv void add(ChannelOutboundBuffer buffer, boolean connected, int maxMessagesPerWrite) throws Exception
add0back to summary
private boolean add0(ByteBuf buf, int index, int len, int segmentLen, InetSocketAddress recipient)
addWritableback to summary
pack-priv boolean addWritable(ByteBuf buf, int index, int len)
clearback to summary
pack-priv void clear()
countback to summary
pack-priv int count()

Returns the count

newAddressback to summary
private static InetSocketAddress newAddress(byte[] addr, int addrLen, int port, int scopeId, byte[] ipv4Bytes) throws UnknownHostException
packetsback to summary
pack-priv NativeDatagramPacketArray.NativeDatagramPacket[] packets()

Returns an array with count() NativeDatagramPackets filled.

releaseback to summary
pack-priv void release()
io.netty.channel.epoll back to summary

private final Class NativeDatagramPacketArray.MyMessageProcessor

extends Object
implements MessageProcessor
Class Inheritance
  • java.lang.Object
  • io.netty.channel.epoll.NativeDatagramPacketArray.MyMessageProcessor
All Implemented Interfaces
io.netty.channel.ChannelOutboundBuffer.MessageProcessor

Field Summary

Modifier and TypeField and Description
private boolean
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
processMessage(Object msg)

Implements io.netty.channel.ChannelOutboundBuffer.MessageProcessor.processMessage.

Will be called for each flushed message until it either there are no more flushed messages or this method returns false.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectedback to summary
private boolean connected
maxMessagesPerWriteback to summary
private int maxMessagesPerWrite

Constructor Detail

MyMessageProcessorback to summary
private MyMessageProcessor()

Method Detail

processMessageback to summary
public boolean processMessage(Object msg)

Implements io.netty.channel.ChannelOutboundBuffer.MessageProcessor.processMessage.

Doc from io.netty.channel.ChannelOutboundBuffer.MessageProcessor.processMessage.

Will be called for each flushed message until it either there are no more flushed messages or this method returns false.

Annotations
@Override
io.netty.channel.epoll back to summary

public final Class NativeDatagramPacketArray.NativeDatagramPacket

extends Object
Class Inheritance
  • java.lang.Object
  • io.netty.channel.epoll.NativeDatagramPacketArray.NativeDatagramPacket
Annotations
@SuppressWarnings:unused
@UnstableApi

Used to pass needed data to JNI.

Field Summary

Modifier and TypeField and Description
private int
private long
private final byte[]
private int
private int
private int
private int
private final byte[]
private int
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
private void
init(long memoryAddress, int count, int segmentSize, InetSocketAddress recipient)

pack-priv DatagramPacket
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
private int count
memoryAddressback to summary
private long memoryAddress
recipientAddrback to summary
private final byte[] recipientAddr
recipientAddrLenback to summary
private int recipientAddrLen
recipientPortback to summary
private int recipientPort
recipientScopeIdback to summary
private int recipientScopeId
segmentSizeback to summary
private int segmentSize
senderAddrback to summary
private final byte[] senderAddr
senderAddrLenback to summary
private int senderAddrLen
senderPortback to summary
private int senderPort
senderScopeIdback to summary
private int senderScopeId

Constructor Detail

NativeDatagramPacketback to summary
public NativeDatagramPacket()

Method Detail

hasSenderback to summary
pack-priv boolean hasSender()
initback to summary
private void init(long memoryAddress, int count, int segmentSize, InetSocketAddress recipient)
newDatagramPacketback to summary
pack-priv DatagramPacket newDatagramPacket(ByteBuf buffer, InetSocketAddress recipient) throws UnknownHostException