Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[#844] support UDT #867

Closed
wants to merge 1 commit into from

5 participants

@carrot-garden

please review original barchart-udt integration submission

@carrot-garden carrot-garden referenced this pull request
Closed

support UDT #844

...in/java/io/netty/channel/socket/UdtChannelConfig.java
((107 lines not shown))
+ /**
+ * Sets the {@link StandardSocketOptions#SO_REUSEADDR} option.
+ */
+ UdtChannelConfig setReuseAddress(boolean reuseAddress);
+
+ /**
+ * Sets the {@link StandardSocketOptions#SO_SNDBUF} option.
+ */
+ UdtChannelConfig setSendBufferSize(int sendBufferSize);
+
+ /**
+ * Sets the {@link StandardSocketOptions#SO_LINGER} option.
+ */
+ UdtChannelConfig setSoLinger(int soLinger);
+
+ //
@normanmaurer Collaborator

remove // and add javadocs to the next methods...

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...src/main/java/io/netty/channel/socket/UdtMessage.java
((31 lines not shown))
+ if (data == null) {
+ throw new NullPointerException("data");
+ }
+ this.data = data;
+ }
+
+ /**
+ * Return the data which is container. May return an empty {@link ByteBuf}
+ */
+ public ByteBuf data() {
+ return data;
+ }
+
+ /** free underlying direct buffer, if any */
+ public void free() {
+ if (data.isDirect() && !data.isFreed()) {
@normanmaurer Collaborator

Why free on direct buffer ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/channel/socket/nio/NioUdtBaseAcceptorChannel.java
((33 lines not shown))
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+
+/**
+ * Common base for Netty Byte/Message UDT Stream/Datagram acceptors.
+ */
+public abstract class NioUdtBaseAcceptorChannel extends
+ AbstractNioMessageChannel implements UdtChannel {
+
+ protected static final InternalLogger logger = //
+ InternalLoggerFactory.getInstance(NioUdtBaseAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = //
+ new ChannelMetadata(BufType.MESSAGE, false);
+
+ //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/channel/socket/nio/NioUdtBaseAcceptorChannel.java
((30 lines not shown))
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+
+/**
+ * Common base for Netty Byte/Message UDT Stream/Datagram acceptors.
+ */
+public abstract class NioUdtBaseAcceptorChannel extends
+ AbstractNioMessageChannel implements UdtChannel {
+
+ protected static final InternalLogger logger = //
+ InternalLoggerFactory.getInstance(NioUdtBaseAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/channel/socket/nio/NioUdtBaseAcceptorChannel.java
((38 lines not shown))
+ */
+public abstract class NioUdtBaseAcceptorChannel extends
+ AbstractNioMessageChannel implements UdtChannel {
+
+ protected static final InternalLogger logger = //
+ InternalLoggerFactory.getInstance(NioUdtBaseAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = //
+ new ChannelMetadata(BufType.MESSAGE, false);
+
+ //
+
+ protected final UdtChannelConfig config;
+
+ protected NioUdtBaseAcceptorChannel(final ServerSocketChannelUDT channelUDT) {
+ super(//
@normanmaurer Collaborator

Remove all of these //, I guess these are left-overs

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/channel/socket/nio/NioUdtByteConnectorChannel.java
((27 lines not shown))
+import io.netty.logging.InternalLoggerFactory;
+
+import java.io.IOException;
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty Byte Channel Connector for UDT Streams
+ */
+public class NioUdtByteConnectorChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = //
@normanmaurer Collaborator

Again remove all of these //

done, except where it helps readability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...y/channel/socket/nio/NioUdtByteRendezvousChannel.java
((22 lines not shown))
+import io.netty.channel.ChannelMetadata;
+import io.netty.channel.socket.DefaultUdtChannelConfig;
+import io.netty.channel.socket.UdtChannel;
+import io.netty.channel.socket.UdtChannelConfig;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import java.io.IOException;
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * TODO Netty Byte Channel Rendezvous for UDT Streams
@normanmaurer Collaborator

What is this TODO about ?

still work in progress. I want to keep it to advertise. if not ready by the time of release I will remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...y/channel/socket/nio/NioUdtByteRendezvousChannel.java
((26 lines not shown))
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import java.io.IOException;
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * TODO Netty Byte Channel Rendezvous for UDT Streams
+ */
+public class NioUdtByteRendezvousChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
@normanmaurer Collaborator

Remove all of the //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...hannel/socket/nio/NioUdtMessageRendezvousChannel.java
((25 lines not shown))
+import io.netty.channel.socket.UdtChannel;
+import io.netty.channel.socket.UdtChannelConfig;
+import io.netty.channel.socket.UdtMessage;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import java.io.IOException;
+import java.net.SocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * TODO Netty Message Rendezvous for UDT Datagrams
@normanmaurer Collaborator

What is the TODO about ?

still work in progress. I want to keep it to advertise. if not ready by the time of release I will remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/channel/socket/nio/NioUdtProvider.java
((27 lines not shown))
+import com.barchart.udt.nio.KindUDT;
+import com.barchart.udt.nio.SelectorProviderUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty UDT component provider:
+ * <p>
+ * provides ChannelFactory for UDT channels
+ * <p>
+ * provides SelectorProvider for UDT channels
+ * <p>
+ * see src/test/java/example
+ */
+public class NioUdtProvider implements ChannelFactory {
+
@normanmaurer Collaborator

Remove all of the //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/channel/socket/nio/NioUdtProvider.java
((108 lines not shown))
+ }
+ case CONNECTOR:
+ switch (type) {
+ case DATAGRAM:
+ return new NioUdtMessageConnectorChannel();
+ case STREAM:
+ return new NioUdtByteConnectorChannel();
+ default:
+ throw new IllegalStateException("wrong type=" + type);
+ }
+ default:
+ throw new IllegalStateException("wrong kind=" + kind);
+ }
+ }
+
+ public static SocketUDT socketUDT(final Channel channel) {
@normanmaurer Collaborator

Add javadocs

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/channel/socket/nio/TestNioUdtProvider.java
@@ -0,0 +1,17 @@
+package io.netty.channel.socket.nio;
@normanmaurer Collaborator

Remove this file ?

finished test instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@normanmaurer
Collaborator

@carrot-garden all in all great work! I just start to wonder if it would make more sense to have it in a separate module as it adds a depedency to the "core" transports.

@trustin wdyt ?

@carrot-garden

I signed the CLA

@carrot-garden

@normanmaurer should I make it a separate module? then the original #844 issue comes up: not public:

AbstractNioByteChannel
AbstractNioMessageChannel

if separate module, what module name?

/transport-udt

?
if separate module, which name space?

io.netty.channel.socket.udt
io.netty.channel.socket.nio.udt

?

@carrot-garden

@normanmaurer where udt examples should go?

1) /example module? (src/main/java)
2) /transport-udt module? (src/test/java)
3) which package?

currently : /example/src/main/java/io/netty/example/udt

@normanmaurer
Collaborator
@normanmaurer
Collaborator
@carrot-garden
@carrot-garden
@normanmaurer
Collaborator
@carrot-garden
...a/io/netty/example/udt/echo/bytes/ByteEchoClient.java
((60 lines not shown))
+ private final String host;
+ private final int port;
+ private final int messageSize;
+
+ public ByteEchoClient(final String host, final int port,
+ final int messageSize) {
+ this.host = host;
+ this.port = port;
+ this.messageSize = messageSize;
+ }
+
+ public void run() throws Exception {
+ // Configure the client.
+ final Bootstrap boot = new Bootstrap();
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup connectGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/example/udt/echo/bytes/ByteEchoClientHandler.java
((42 lines not shown))
+
+ private final ByteBuf message;
+
+ public ByteEchoClientHandler(final int messageSize) {
+ message = Unpooled.buffer(messageSize);
+ for (int i = 0; i < message.capacity(); i++) {
+ message.writeByte((byte) i);
+ }
+ }
+
+ final Meter meter = Metrics.newMeter(ByteEchoClientHandler.class, "rate",
+ "bytes", TimeUnit.SECONDS);
+
+ @Override
+ public void channelActive(final ChannelHandlerContext ctx) throws Exception {
+ log.info("ECHO active {}", //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/example/udt/echo/bytes/ByteEchoServer.java
((28 lines not shown))
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.logging.Slf4JLoggerFactory;
+
+import java.util.concurrent.ThreadFactory;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * UDT STREAM server
+ * <p>
+ * Echoes back any received data from a client.
+ */
+public class ByteEchoServer {
+
+ static Logger log = LoggerFactory.getLogger(ByteEchoServer.class);
@normanmaurer Collaborator

Should be final and maybe also private

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/example/udt/echo/bytes/ByteEchoServer.java
((49 lines not shown))
+ final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
+ InternalLoggerFactory.setDefaultFactory(defaultFactory);
+ log.info("InternalLoggerFactory={}", InternalLoggerFactory
+ .getDefaultFactory().getClass().getName());
+ }
+
+ private final int port;
+
+ public ByteEchoServer(final int port) {
+ this.port = port;
+ }
+
+ public void run() throws Exception {
+ final ThreadFactory acceptFactory = new ThreadFactoryUDT("accept");
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup acceptGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/example/udt/echo/bytes/ByteEchoServer.java
((51 lines not shown))
+ log.info("InternalLoggerFactory={}", InternalLoggerFactory
+ .getDefaultFactory().getClass().getName());
+ }
+
+ private final int port;
+
+ public ByteEchoServer(final int port) {
+ this.port = port;
+ }
+
+ public void run() throws Exception {
+ final ThreadFactory acceptFactory = new ThreadFactoryUDT("accept");
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup acceptGroup = new NioEventLoopGroup(//
+ 1, acceptFactory, NioUdtProvider.BYTE_PROVIDER);
+ final NioEventLoopGroup connectGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/example/udt/echo/bytes/ByteEchoServerHandler.java
((40 lines not shown))
+ final ByteBuf out = ctx.nextOutboundByteBuffer();
+ out.discardReadBytes();
+ out.writeBytes(in);
+ ctx.flush();
+ }
+
+ @Override
+ public void exceptionCaught(final ChannelHandlerContext ctx,
+ final Throwable cause) {
+ log.error("close the connection when an exception is raised", cause);
+ ctx.close();
+ }
+
+ @Override
+ public void channelActive(final ChannelHandlerContext ctx) throws Exception {
+ log.info("ECHO active {}", //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../io/netty/example/udt/echo/message/MsgEchoClient.java
((60 lines not shown))
+ private final String host;
+ private final int port;
+ private final int messageSize;
+
+ public MsgEchoClient(final String host, final int port,
+ final int messageSize) {
+ this.host = host;
+ this.port = port;
+ this.messageSize = messageSize;
+ }
+
+ public void run() throws Exception {
+ // Configure the client.
+ final Bootstrap boot = new Bootstrap();
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup connectGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/example/udt/echo/message/MsgEchoClientHandler.java
((45 lines not shown))
+ private final UdtMessage message;
+
+ public MsgEchoClientHandler(final int messageSize) {
+ final ByteBuf byteBuf = Unpooled.buffer(messageSize);
+ for (int i = 0; i < byteBuf.capacity(); i++) {
+ byteBuf.writeByte((byte) i);
+ }
+ message = new UdtMessage(byteBuf);
+ }
+
+ final Meter meter = Metrics.newMeter(MsgEchoClientHandler.class, "rate",
+ "bytes", TimeUnit.SECONDS);
+
+ @Override
+ public void channelActive(final ChannelHandlerContext ctx) throws Exception {
+ log.info("ECHO active {}", //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../io/netty/example/udt/echo/message/MsgEchoServer.java
((28 lines not shown))
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.logging.Slf4JLoggerFactory;
+
+import java.util.concurrent.ThreadFactory;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * UDT STREAM server
+ * <p>
+ * Echoes back any received data from a client.
+ */
+public class MsgEchoServer {
+
+ static Logger log = LoggerFactory.getLogger(MsgEchoServer.class);
@normanmaurer Collaborator

Should be final and maybe also private

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../io/netty/example/udt/echo/message/MsgEchoServer.java
((49 lines not shown))
+ final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
+ InternalLoggerFactory.setDefaultFactory(defaultFactory);
+ log.info("InternalLoggerFactory={}", InternalLoggerFactory
+ .getDefaultFactory().getClass().getName());
+ }
+
+ private final int port;
+
+ public MsgEchoServer(final int port) {
+ this.port = port;
+ }
+
+ public void run() throws Exception {
+ final ThreadFactory acceptFactory = new ThreadFactoryUDT("accept");
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup acceptGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../io/netty/example/udt/echo/message/MsgEchoServer.java
((51 lines not shown))
+ log.info("InternalLoggerFactory={}", InternalLoggerFactory
+ .getDefaultFactory().getClass().getName());
+ }
+
+ private final int port;
+
+ public MsgEchoServer(final int port) {
+ this.port = port;
+ }
+
+ public void run() throws Exception {
+ final ThreadFactory acceptFactory = new ThreadFactoryUDT("accept");
+ final ThreadFactory connectFactory = new ThreadFactoryUDT("connect");
+ final NioEventLoopGroup acceptGroup = new NioEventLoopGroup(//
+ 1, acceptFactory, NioUdtProvider.MESSAGE_PROVIDER);
+ final NioEventLoopGroup connectGroup = new NioEventLoopGroup(//
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/example/udt/echo/message/MsgEchoServerHandler.java
((33 lines not shown))
+public class MsgEchoServerHandler extends
+ ChannelInboundMessageHandlerAdapter<UdtMessage> {
+
+ private static final Logger log = LoggerFactory
+ .getLogger(MsgEchoServerHandler.class.getName());
+
+ @Override
+ public void exceptionCaught(final ChannelHandlerContext ctx,
+ final Throwable cause) {
+ log.error("close the connection when an exception is raised", cause);
+ ctx.close();
+ }
+
+ @Override
+ public void channelActive(final ChannelHandlerContext ctx) throws Exception {
+ log.info("ECHO active {}", //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ava/io/netty/example/udt/util/ConsoleReporterUDT.java
((32 lines not shown))
+import com.yammer.metrics.core.Histogram;
+import com.yammer.metrics.core.Metered;
+import com.yammer.metrics.core.Metric;
+import com.yammer.metrics.core.MetricName;
+import com.yammer.metrics.core.MetricPredicate;
+import com.yammer.metrics.core.MetricProcessor;
+import com.yammer.metrics.core.MetricsRegistry;
+import com.yammer.metrics.core.Timer;
+import com.yammer.metrics.reporting.AbstractPollingReporter;
+import com.yammer.metrics.stats.Snapshot;
+
+/**
+ * A simple reporters which prints out application metrics to a
+ * {@link PrintStream} periodically.
+ */
+public class ConsoleReporterUDT extends AbstractPollingReporter implements
@normanmaurer Collaborator

Could you not directly implement it with our api without the need to pull in metrics dependency ?

1) switched dependency to netty-metrics-yammer (it brings metrics-core)

2) did not migrate yammer.Meter -> netty.YammerEventRateMonitor etc.
since netty monitor api feels clunky and incomplete compared to the yammer.

@trustin Owner
trustin added a note

Rename to UdtConsoleReporter to follow our naming convention

@normanmaurer Collaborator

@carrot-garden could you rename like @trustin suggested ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...channel/socket/nio/NioUdtMessageConnectorChannel.java
((119 lines not shown))
+ } finally {
+ if (!success) {
+ doClose();
+ }
+ }
+ }
+
+ @Override
+ protected void doDisconnect() throws Exception {
+ doClose();
+ }
+
+ @Override
+ protected void doFinishConnect() throws Exception {
+ if (!javaChannel().finishConnect()) {
+ throw new Error("provider error");
@normanmaurer Collaborator

Better Error msg ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...channel/socket/nio/NioUdtMessageConnectorChannel.java
((165 lines not shown))
+
+ @Override
+ protected int doWriteMessages(final MessageBuf<Object> messageQueue,
+ final boolean lastSpin) throws Exception {
+
+ final UdtMessage message = (UdtMessage) messageQueue.peek();
+
+ final ByteBuf byteBuf = message.data();
+
+ final int messageSize = byteBuf.readableBytes();
+
+ ByteBuffer buffer;
+ if (byteBuf.nioBufferCount() == 1) {
+ buffer = byteBuf.nioBuffer();
+ } else {
+ throw new ChannelException("TODO");
@normanmaurer Collaborator

Fix this..

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...hannel/socket/nio/NioUdtMessageRendezvousChannel.java
((165 lines not shown))
+
+ @Override
+ protected int doWriteMessages(final MessageBuf<Object> messageQueue,
+ final boolean lastSpin) throws Exception {
+
+ final UdtMessage message = (UdtMessage) messageQueue.peek();
+
+ final ByteBuf byteBuf = message.data();
+
+ final int messageSize = byteBuf.readableBytes();
+
+ ByteBuffer buffer;
+ if (byteBuf.nioBufferCount() == 1) {
+ buffer = byteBuf.nioBuffer();
+ } else {
+ throw new ChannelException("TODO");
@normanmaurer Collaborator

Fix TODO

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@normanmaurer
Collaborator

@carrot-garden did another round of review

@trustin
Owner

Is there a reason why it depends on a SNAPSHOT version of barchart-udt? I would prefer a non-snapshot version or at least the timestamped one.

I'm fine with making it part of the transport module. Isn't it only several classes?

@normanmaurer
Collaborator

@trustin right.. depending on a SNAPSHOT is a "no go". I only wondered if we want to introduce a optional dependency here...

@normanmaurer
Collaborator

@carrot-garden the classes are now public as it just makes more sense anyway:

#872

@carrot-garden
@carrot-garden
@carrot-garden
@normanmaurer
Collaborator

I think the options are for the dependency in the transport pom right ? If so b)...

@carrot-garden

@normanmaurer @trustin : please think again of more people bringing your more stuff like udt. will you continue to stuff it all in the same transport module? I remember at some point sctp was in a separate transport-sctp module. just want to force you to make up your mind, please : one jumbo transport module vs multi-module transport split?

@carrot-garden
@carrot-garden
@carrot-garden carrot-garden referenced this pull request in barchart/barchart-udt
Closed

implement netty support #7

@carrot-garden

@normanmaurer module split: transport-udt. next review please.

example/pom.xml
@@ -54,6 +55,27 @@
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
+
+ <!-- barchart-udt transport -->
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>netty-transport-udt</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- netty yammer metrics for benchmarks -->
+ <dependency>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-metrics-yammer</artifactId>
+ <version>${project.version}</version>
@trustin Owner
trustin added a note

Indentation

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport/pom.xml
@@ -29,11 +29,13 @@
<name>Netty/Transport</name>
<dependencies>
+
@trustin Owner
trustin added a note

Unnecessary empty line.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport/pom.xml
((5 lines not shown))
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-buffer</artifactId>
<version>${project.version}</version>
</dependency>
+
@trustin Owner
trustin added a note

Unnecessary empty line.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@trustin
Owner

Looks OK, but could you also add the binary for x86_64?

@carrot-garden
@carrot-garden

@trustin next review please.

...etty/transport/udt/nio/NioUdtBaseAcceptorChannel.java
((68 lines not shown))
+ }
+
+ protected NioUdtBaseAcceptorChannel(final TypeUDT type) {
+ this(NioUdtProvider.newAcceptorChannelUDT(type));
+ }
+
+ @Override
+ public UdtChannelConfig config() {
+ return config;
+ }
+
+ @Override
+ protected void doBind(final SocketAddress localAddress) throws Exception {
+ javaChannel().socket().bind(localAddress, config.getBacklog());
+ final SelectionKey selectionKey = selectionKey();
+ selectionKey.interestOps(selectionKey.interestOps()
@trustin Owner
trustin added a note

We should not auto-start read. read() operation will automatically update the interestOps.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((95 lines not shown))
+ }
+
+ @Override
+ protected void doClose() throws Exception {
+ javaChannel().close();
+ }
+
+ @Override
+ protected boolean doConnect(final SocketAddress remoteAddress,
+ final SocketAddress localAddress) throws Exception {
+ doBind(localAddress);
+ boolean success = false;
+ try {
+ final boolean connected = javaChannel().connect(remoteAddress);
+ if (connected) {
+ selectionKey().interestOps(OP_READ);
@trustin Owner
trustin added a note

Should not do auto-start read ops.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((119 lines not shown))
+ }
+ }
+ }
+
+ @Override
+ protected void doDisconnect() throws Exception {
+ doClose();
+ }
+
+ @Override
+ protected void doFinishConnect() throws Exception {
+ if (!javaChannel().finishConnect()) {
+ throw new Error(
+ "Provider error: failed to finish connect. Provider library should be upgraded.");
+ }
+ selectionKey().interestOps(OP_READ);
@trustin Owner
trustin added a note

Should not auto-start read ops

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((97 lines not shown))
+ }
+
+ @Override
+ protected void doClose() throws Exception {
+ javaChannel().close();
+ }
+
+ @Override
+ protected boolean doConnect(final SocketAddress remoteAddress,
+ final SocketAddress localAddress) throws Exception {
+ doBind(localAddress);
+ boolean success = false;
+ try {
+ final boolean connected = javaChannel().connect(remoteAddress);
+ if (connected) {
+ selectionKey().interestOps(OP_READ);
@trustin Owner
trustin added a note

Should not autostart reads

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((121 lines not shown))
+ }
+ }
+ }
+
+ @Override
+ protected void doDisconnect() throws Exception {
+ doClose();
+ }
+
+ @Override
+ protected void doFinishConnect() throws Exception {
+ if (!javaChannel().finishConnect()) {
+ throw new Error(
+ "Provider error: failed to finish connect. Provider library should be upgraded.");
+ }
+ selectionKey().interestOps(OP_READ);
@trustin Owner
trustin added a note

Should not autostart reads

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@trustin
Owner

You might want to apply the same fix with this one: 923dde7

@carrot-garden
@carrot-garden

@trustin next review please.

.../io/netty/example/udt/echo/message/MsgEchoClient.java
((37 lines not shown))
+
+/**
+ * UDT Message Flow client
+ * <p>
+ * Sends one message when a connection is open and echoes back any received data
+ * to the server. Simply put, the echo client initiates the ping-pong traffic
+ * between the echo client and server by sending the first message to the
+ * server.
+ */
+public class MsgEchoClient {
+
+ private static final Logger log = LoggerFactory
+ .getLogger(MsgEchoClient.class);
+
+ /**
+ * use slf4j provider for io.netty.logging.InternalLogger
@trustin Owner
trustin added a note

For examples, I would use the default factory.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/example/udt/echo/rendevous/Config.java
((6 lines not shown))
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.example.udt.echo.rendevous;
+
+/**
+ * Peer to Peer Config
+ */
+public interface Config {
@trustin Owner
trustin added a note

Use public static final class with a private constructor instead.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...netty/example/udt/echo/rendevous/MsgEchoPeerBase.java
((36 lines not shown))
+/**
+ * UDT Message Flow Peer
+ * <p>
+ * Sends one message when a connection is open and echoes back any received data
+ * to the other peer.
+ */
+public abstract class MsgEchoPeerBase {
+
+ protected static final Logger log = LoggerFactory
+ .getLogger(MsgEchoPeerBase.class);
+
+ /**
+ * use slf4j provider for io.netty.logging.InternalLogger
+ */
+ static {
+ final InternalLoggerFactory defaultFactory = new Slf4JLoggerFactory();
@trustin Owner
trustin added a note

Let's use the default logger factory for an example.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...io/netty/example/udt/echo/rendevous/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * examples form netty project adapted for udt
@trustin Owner
trustin added a note

from?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../src/main/java/io/netty/example/udt/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * examples form netty project adapted for udt
@trustin Owner
trustin added a note

from?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/example/udt/util/ThreadFactoryUDT.java
((7 lines not shown))
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package io.netty.example.udt.util;
+
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** */
@trustin Owner
trustin added a note

Unnecessary

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/example/udt/util/ThreadFactoryUDT.java
((20 lines not shown))
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** */
+public class ThreadFactoryUDT implements ThreadFactory {
+
+ private static final AtomicInteger counter = new AtomicInteger();
+
+ private final String name;
+
+ public ThreadFactoryUDT(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public Thread newThread(final Runnable runnable) {
+ return new Thread(//
@trustin Owner
trustin added a note

Trailing //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...main/java/io/netty/example/udt/util/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * examples form netty project adapted for udt
@trustin Owner
trustin added a note

from

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@trustin trustin commented on the diff
@@ -220,9 +221,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <version>1.6.6</version>
+ <groupId>ch.qos.logback</groupId>
@trustin Owner
trustin added a note

Any reason we need to replace slf4j-simple with logback for examples?

I need to disable debug logging which comes from barchart-udt with help of /src/test/resources/logback-test.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport-udt/build/maven-test.ant
@@ -0,0 +1,40 @@
+<!--
@trustin Owner
trustin added a note

We don't need this file in the repository.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport-udt/build/maven-install.ant
@@ -0,0 +1,40 @@
+<!--
@trustin Owner
trustin added a note

We don't need this file in the repository.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport-udt/build/maven-install-quick.ant
@@ -0,0 +1,43 @@
+<!--
@trustin Owner
trustin added a note

We don't need this file in the repository.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/DefaultUdtChannelConfig.java
((26 lines not shown))
+import com.barchart.udt.SocketUDT;
+import com.barchart.udt.nio.ChannelUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * The default {@link UdtChannelConfig} implementation.
+ */
+public class DefaultUdtChannelConfig extends DefaultChannelConfig implements
+ UdtChannelConfig {
+
+ public DefaultUdtChannelConfig(final UdtChannel channel) {
+ super(channel);
+ }
+
+ public static final int K = 1024;
@trustin Owner
trustin added a note

should be private

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/DefaultUdtChannelConfig.java
((27 lines not shown))
+import com.barchart.udt.nio.ChannelUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * The default {@link UdtChannelConfig} implementation.
+ */
+public class DefaultUdtChannelConfig extends DefaultChannelConfig implements
+ UdtChannelConfig {
+
+ public DefaultUdtChannelConfig(final UdtChannel channel) {
+ super(channel);
+ }
+
+ public static final int K = 1024;
+ public static final int M = K * K;
@trustin Owner
trustin added a note

should be private

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/DefaultUdtChannelConfig.java
((44 lines not shown))
+ private volatile int protocolReceiveBuferSize = 10 * M;
+ private volatile int protocolSendBuferSize = 10 * M;
+
+ private volatile int systemReceiveBufferSize = 1 * M;
+ private volatile int systemSendBuferSize = 1 * M;
+
+ private volatile int allocatorReceiveBufferSize = 128 * K;
+ private volatile int allocatorSendBufferSize = 128 * K;
+
+ private volatile int backlog = 64;
+ private volatile int soLinger;
+
+ private volatile boolean reuseAddress = true;
+
+ @Override
+ public void apply(final ServerSocketChannelUDT channelUDT)
@trustin Owner
trustin added a note

These methods should be package-private or protected.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/DefaultUdtChannelConfig.java
((132 lines not shown))
+ return super.getOption(option);
+ }
+
+ @Override
+ public Map<ChannelOption<?>, Object> getOptions() {
+ return getOptions(//
+ super.getOptions(), //
+ PROTOCOL_RECEIVE_BUFFER_SIZE, //
+ PROTOCOL_SEND_BUFFER_SIZE, //
+ SYSTEM_RECEIVE_BUFFER_SIZE, //
+ SYSTEM_SEND_BUFFER_SIZE, //
+ SO_RCVBUF, //
+ SO_SNDBUF, //
+ SO_REUSEADDR, //
+ SO_LINGER, //
+ SO_BACKLOG //
@trustin Owner
trustin added a note

Trailing '//' s

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport-udt/pom.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ~ Copyright 2012 The Netty Project ~ ~ The Netty Project licenses this
+ file to you under the Apache License, ~ version 2.0 (the "License"); you
+ may not use this file except in compliance ~ with the License. You may obtain
+ a copy of the License at: ~ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~ ~ Unless required by applicable law or agreed to in writing, software ~
@trustin Owner
trustin added a note

Bad license formatting

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/DefaultUdtChannelConfig.java
((48 lines not shown))
+ private volatile int systemSendBuferSize = 1 * M;
+
+ private volatile int allocatorReceiveBufferSize = 128 * K;
+ private volatile int allocatorSendBufferSize = 128 * K;
+
+ private volatile int backlog = 64;
+ private volatile int soLinger;
+
+ private volatile boolean reuseAddress = true;
+
+ @Override
+ public void apply(final ServerSocketChannelUDT channelUDT)
+ throws IOException {
+ apply((ChannelUDT) channelUDT);
+ final SocketUDT socketUDT = channelUDT.socketUDT();
+ // TODO acceptor specific
@trustin Owner
trustin added a note

TODO

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../src/main/java/io/netty/transport/udt/UdtChannel.java
((14 lines not shown))
+ * under the License.
+ */
+package io.netty.transport.udt;
+
+import io.netty.channel.Channel;
+import io.netty.transport.udt.nio.NioUdtProvider;
+
+/**
+ * Netty UDT {@link Channel}.
+ * <p>
+ * Supported UDT {@link UdtChannel} are available via {@link NioUdtProvider}
+ */
+public interface UdtChannel extends Channel {
+
+ /**
+ * Returns the {@link UdtChannelConfig} configuration of the channel.
@trustin Owner
trustin added a note

'configuration' is redundant.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ava/io/netty/transport/udt/util/ThreadFactoryUDT.java
((22 lines not shown))
+/**
+ * testing thread factory
+ */
+public class ThreadFactoryUDT implements ThreadFactory {
+
+ private static final AtomicInteger counter = new AtomicInteger();
+
+ private final String name;
+
+ public ThreadFactoryUDT(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public Thread newThread(final Runnable runnable) {
+ return new Thread(//
@trustin Owner
trustin added a note

Trailing //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/example/udt/util/ThreadFactoryUDT.java
((8 lines not shown))
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package io.netty.example.udt.util;
+
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/** */
+public class ThreadFactoryUDT implements ThreadFactory {
@trustin Owner
trustin added a note

Rename to UdtThreadFactory to follow our naming convention.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...st/java/io/netty/transport/udt/util/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Netty UDT Benchmarks and Tests Utilities
@trustin Owner
trustin added a note

Netty is redundant :-)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../src/main/java/io/netty/transport/udt/UdtChannel.java
((7 lines not shown))
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.transport.udt;
+
+import io.netty.channel.Channel;
+import io.netty.transport.udt.nio.NioUdtProvider;
+
+/**
+ * Netty UDT {@link Channel}.
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...etty/transport/udt/nio/NioUdtByteAcceptorChannel.java
((13 lines not shown))
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.transport.udt.nio;
+
+import io.netty.buffer.BufType;
+import io.netty.buffer.MessageBuf;
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty Byte Channel Acceptor for UDT Streams
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((23 lines not shown))
+import io.netty.channel.ChannelMetadata;
+import io.netty.channel.socket.nio.AbstractNioByteChannel;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.transport.udt.DefaultUdtChannelConfig;
+import io.netty.transport.udt.UdtChannel;
+import io.netty.transport.udt.UdtChannelConfig;
+
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty Byte Channel Connector for UDT Streams
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/transport/udt/nio/NioUdtByteRendezvousChannel.java
((10 lines not shown))
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.transport.udt.nio;
+
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.transport.udt.UdtChannel;
+
+import com.barchart.udt.TypeUDT;
+
+/**
+ * Netty Byte Channel Rendezvous for UDT Streams
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...y/transport/udt/nio/NioUdtMessageAcceptorChannel.java
((13 lines not shown))
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.transport.udt.nio;
+
+import io.netty.buffer.BufType;
+import io.netty.buffer.MessageBuf;
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty Message Channel Acceptor for UDT Datagrams
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...transport/udt/nio/NioUdtMessageRendezvousChannel.java
((11 lines not shown))
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+package io.netty.transport.udt.nio;
+
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.transport.udt.UdtChannel;
+import io.netty.transport.udt.UdtMessage;
+
+import com.barchart.udt.TypeUDT;
+
+/**
+ * Netty Message Rendezvous for UDT Datagrams
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...n/java/io/netty/transport/udt/nio/NioUdtProvider.java
((23 lines not shown))
+import io.netty.transport.udt.UdtChannel;
+
+import java.io.IOException;
+import java.nio.channels.spi.SelectorProvider;
+
+import com.barchart.udt.SocketUDT;
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.ChannelUDT;
+import com.barchart.udt.nio.KindUDT;
+import com.barchart.udt.nio.RendezvousChannelUDT;
+import com.barchart.udt.nio.SelectorProviderUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Netty UDT NIO components provider:
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ain/java/io/netty/transport/udt/nio/package-info.java
((2 lines not shown))
+ * Copyright 2012 The Netty Project
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Netty UDT Transport for NIO Channels
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ain/java/io/netty/transport/udt/oio/package-info.java
((2 lines not shown))
+ * Copyright 2012 The Netty Project
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Netty UDT Transport for OIO Channels
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...rc/main/java/io/netty/transport/udt/package-info.java
((2 lines not shown))
+ * Copyright 2012 The Netty Project
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+/**
+ * Netty UDT Transport
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...t/java/io/netty/transport/udt/bench/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Netty UDT Benchmarks
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...a/io/netty/transport/udt/bench/xfer/package-info.java
((3 lines not shown))
+ *
+ * The Netty Project licenses this file to you under the Apache License,
+ * version 2.0 (the "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Netty UDT Transfer Speed Benchmarks
@trustin Owner
trustin added a note

'Netty' is redundant (package name tells it)

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@trustin
Owner

In overall, it looks fine. My comments are mostly about cosmetic issues and styles. Looking forward to merging your work. By the way, did you check my e-mail to you, @carrot-garden?

@normanmaurer
Collaborator

@carrot-garden check your email now ! =P

@carrot-garden
@carrot-garden
@normanmaurer
Collaborator
...ain/java/io/netty/transport/udt/UdtChannelConfig.java
((59 lines not shown))
+ * <td>{@code "systemReceiveBufferSize"}</td>
+ * <td>{@link #setSystemBufferSize(int)}</td>
+ * <tr>
+ * </table>
+ * <p>
+ * Note that {@link TypeUDT#DATAGRAM} message oriented channels treat
+ * {@code "receiveBufferSize"} and {@code "sendBufferSize"} as maximum message
+ * size. If received or sent message does not fit specified sizes,
+ * {@link ChannelException} will be thrown.
+ */
+public interface UdtChannelConfig extends ChannelConfig {
+
+ /**
+ * See {@link OptionUDT#Protocol_Receive_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_RECEIVE_BUFFER_SIZE = //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ain/java/io/netty/transport/udt/UdtChannelConfig.java
((65 lines not shown))
+ * {@code "receiveBufferSize"} and {@code "sendBufferSize"} as maximum message
+ * size. If received or sent message does not fit specified sizes,
+ * {@link ChannelException} will be thrown.
+ */
+public interface UdtChannelConfig extends ChannelConfig {
+
+ /**
+ * See {@link OptionUDT#Protocol_Receive_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_RECEIVE_BUFFER_SIZE = //
+ new ChannelOption<Integer>("PROTOCOL_RECEIVE_BUFFER_SIZE");
+
+ /**
+ * See {@link OptionUDT#Protocol_Send_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_SEND_BUFFER_SIZE = //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ain/java/io/netty/transport/udt/UdtChannelConfig.java
((71 lines not shown))
+ /**
+ * See {@link OptionUDT#Protocol_Receive_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_RECEIVE_BUFFER_SIZE = //
+ new ChannelOption<Integer>("PROTOCOL_RECEIVE_BUFFER_SIZE");
+
+ /**
+ * See {@link OptionUDT#Protocol_Send_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_SEND_BUFFER_SIZE = //
+ new ChannelOption<Integer>("PROTOCOL_SEND_BUFFER_SIZE");
+
+ /**
+ * See {@link OptionUDT#System_Receive_Buffer_Size}.
+ */
+ ChannelOption<Integer> SYSTEM_RECEIVE_BUFFER_SIZE = //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ain/java/io/netty/transport/udt/UdtChannelConfig.java
((77 lines not shown))
+ /**
+ * See {@link OptionUDT#Protocol_Send_Buffer_Size}.
+ */
+ ChannelOption<Integer> PROTOCOL_SEND_BUFFER_SIZE = //
+ new ChannelOption<Integer>("PROTOCOL_SEND_BUFFER_SIZE");
+
+ /**
+ * See {@link OptionUDT#System_Receive_Buffer_Size}.
+ */
+ ChannelOption<Integer> SYSTEM_RECEIVE_BUFFER_SIZE = //
+ new ChannelOption<Integer>("SYSTEM_RECEIVE_BUFFER_SIZE");
+
+ /**
+ * See {@link OptionUDT#System_Send_Buffer_Size}.
+ */
+ ChannelOption<Integer> SYSTEM_SEND_BUFFER_SIZE = //
@normanmaurer Collaborator

Remove //

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...y/transport/udt/nio/NioUdtMessageAcceptorChannel.java
((20 lines not shown))
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Message Channel Acceptor for UDT Datagrams.
+ */
+public class NioUdtMessageAcceptorChannel extends NioUdtAcceptorChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtMessageAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...etty/transport/udt/nio/NioUdtByteAcceptorChannel.java
((23 lines not shown))
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Byte Channel Acceptor for UDT Streams.
+ */
+public class NioUdtByteAcceptorChannel extends NioUdtAcceptorChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
+ BufType.BYTE, false);
+
+ protected NioUdtByteAcceptorChannel() {
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...etty/transport/udt/nio/NioUdtByteAcceptorChannel.java
((17 lines not shown))
+
+import io.netty.buffer.BufType;
+import io.netty.buffer.MessageBuf;
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Byte Channel Acceptor for UDT Streams.
+ */
+public class NioUdtByteAcceptorChannel extends NioUdtAcceptorChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...etty/transport/udt/nio/NioUdtByteAcceptorChannel.java
((20 lines not shown))
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Byte Channel Acceptor for UDT Streams.
+ */
+public class NioUdtByteAcceptorChannel extends NioUdtAcceptorChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteAcceptorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((28 lines not shown))
+import io.netty.transport.udt.UdtChannel;
+import io.netty.transport.udt.UdtChannelConfig;
+
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Byte Channel Connector for UDT Streams.
+ */
+public class NioUdtByteConnectorChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((31 lines not shown))
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Byte Channel Connector for UDT Streams.
+ */
+public class NioUdtByteConnectorChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteConnectorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((36 lines not shown))
+
+/**
+ * Byte Channel Connector for UDT Streams.
+ */
+public class NioUdtByteConnectorChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteConnectorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
+ BufType.BYTE, false);
+
+ private final UdtChannelConfig config;
+
+ protected NioUdtByteConnectorChannel() {
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java
((40 lines not shown))
+public class NioUdtByteConnectorChannel extends AbstractNioByteChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteConnectorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
+ BufType.BYTE, false);
+
+ private final UdtChannelConfig config;
+
+ protected NioUdtByteConnectorChannel() {
+ this(TypeUDT.STREAM);
+ }
+
+ protected NioUdtByteConnectorChannel(final Channel parent,
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/transport/udt/nio/NioUdtByteRendezvousChannel.java
((15 lines not shown))
+ */
+package io.netty.transport.udt.nio;
+
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.transport.udt.UdtChannel;
+
+import com.barchart.udt.TypeUDT;
+
+/**
+ * Byte Channel Rendezvous for UDT Streams.
+ */
+public class NioUdtByteRendezvousChannel extends NioUdtByteConnectorChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...ty/transport/udt/nio/NioUdtByteRendezvousChannel.java
((18 lines not shown))
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+import io.netty.transport.udt.UdtChannel;
+
+import com.barchart.udt.TypeUDT;
+
+/**
+ * Byte Channel Rendezvous for UDT Streams.
+ */
+public class NioUdtByteRendezvousChannel extends NioUdtByteConnectorChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtByteRendezvousChannel.class);
+
+ protected NioUdtByteRendezvousChannel() {
@normanmaurer Collaborator

public ?

done

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...y/transport/udt/nio/NioUdtMessageAcceptorChannel.java
((17 lines not shown))
+
+import io.netty.buffer.BufType;
+import io.netty.buffer.MessageBuf;
+import io.netty.channel.ChannelMetadata;
+import io.netty.logging.InternalLogger;
+import io.netty.logging.InternalLoggerFactory;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Message Channel Acceptor for UDT Datagrams.
+ */
+public class NioUdtMessageAcceptorChannel extends NioUdtAcceptorChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((32 lines not shown))
+
+import java.net.SocketAddress;
+import java.nio.channels.SelectionKey;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Message Connector for UDT Datagrams.
+ * <p>
+ * Note: send/receive must use {@link UdtMessage} in the pipeline
+ */
+public class NioUdtMessageConnectorChannel extends AbstractNioMessageChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((35 lines not shown))
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * Message Connector for UDT Datagrams.
+ * <p>
+ * Note: send/receive must use {@link UdtMessage} in the pipeline
+ */
+public class NioUdtMessageConnectorChannel extends AbstractNioMessageChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtMessageConnectorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((44 lines not shown))
+public class NioUdtMessageConnectorChannel extends AbstractNioMessageChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtMessageConnectorChannel.class);
+
+ protected static final ChannelMetadata METADATA = new ChannelMetadata(
+ BufType.MESSAGE, false);
+
+ private final UdtChannelConfig config;
+
+ protected NioUdtMessageConnectorChannel() {
+ this(TypeUDT.DATAGRAM);
+ }
+
+ protected NioUdtMessageConnectorChannel(final Channel parent,
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((70 lines not shown))
+ config = new DefaultUdtChannelConfig(this, channelUDT, false);
+ break;
+ }
+ } catch (final Exception e) {
+ try {
+ channelUDT.close();
+ } catch (final Exception e2) {
+ if (logger.isWarnEnabled()) {
+ logger.warn("Failed to close channel.", e2);
+ }
+ }
+ throw new ChannelException("Failed to configure channel.", e);
+ }
+ }
+
+ protected NioUdtMessageConnectorChannel(final SocketChannelUDT channelUDT) {
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../transport/udt/nio/NioUdtMessageConnectorChannel.java
((74 lines not shown))
+ try {
+ channelUDT.close();
+ } catch (final Exception e2) {
+ if (logger.isWarnEnabled()) {
+ logger.warn("Failed to close channel.", e2);
+ }
+ }
+ throw new ChannelException("Failed to configure channel.", e);
+ }
+ }
+
+ protected NioUdtMessageConnectorChannel(final SocketChannelUDT channelUDT) {
+ this(null, channelUDT.socketUDT().id(), channelUDT);
+ }
+
+ protected NioUdtMessageConnectorChannel(final TypeUDT type) {
@normanmaurer Collaborator

public ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...n/java/io/netty/transport/udt/nio/NioUdtProvider.java
((31 lines not shown))
+import com.barchart.udt.nio.KindUDT;
+import com.barchart.udt.nio.RendezvousChannelUDT;
+import com.barchart.udt.nio.SelectorProviderUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * UDT NIO components provider:
+ * <p>
+ * Provides {@link ChannelFactory} for UDT channels.
+ * <p>
+ * Provides {@link SelectorProvider} for UDT channels.
+ */
+public class NioUdtProvider implements ChannelFactory {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
@normanmaurer Collaborator

private ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...n/java/io/netty/transport/udt/nio/NioUdtProvider.java
((29 lines not shown))
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.ChannelUDT;
+import com.barchart.udt.nio.KindUDT;
+import com.barchart.udt.nio.RendezvousChannelUDT;
+import com.barchart.udt.nio.SelectorProviderUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+import com.barchart.udt.nio.SocketChannelUDT;
+
+/**
+ * UDT NIO components provider:
+ * <p>
+ * Provides {@link ChannelFactory} for UDT channels.
+ * <p>
+ * Provides {@link SelectorProvider} for UDT channels.
+ */
+public class NioUdtProvider implements ChannelFactory {
@normanmaurer Collaborator

final ?

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
.../java/io/netty/example/udt/util/ThreadFactoryUDT.java
((10 lines not shown))
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ */
+
+package io.netty.example.udt.util;
+
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Custom thread factory to use with examples.
+ */
+public class ThreadFactoryUDT implements ThreadFactory {
@normanmaurer Collaborator

Please rename to UdtThreadFactory

i think so,an prefix is more good and clean

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
transport-udt/pom.xml
((37 lines not shown))
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>netty-buffer</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>netty-transport</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.barchart.udt</groupId>
+ <artifactId>barchart-udt-bundle</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
@normanmaurer Collaborator

We will need a non SNAPSHOT... Can you release one and update the dependency ?

yes, when you say "final yes" to this pull request, I will cut a release. there are still minor changes being made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...io/netty/transport/udt/nio/NioUdtAcceptorChannel.java
((28 lines not shown))
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+
+import com.barchart.udt.TypeUDT;
+import com.barchart.udt.nio.ServerSocketChannelUDT;
+
+/**
+ * Common base for Netty Byte/Message UDT Stream/Datagram acceptors.
+ */
+public abstract class NioUdtAcceptorChannel extends AbstractNioMessageChannel
+ implements UdtChannel {
+
+ protected static final InternalLogger logger = InternalLoggerFactory
+ .getInstance(NioUdtAcceptorChannel.class);
+
+ protected final UdtChannelConfig config;
@normanmaurer Collaborator

private as it can be accessed via the getConfig()

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
...tty/transport/udt/nio/NioUdtByteConnectorChannel.java