RuedigerMoeller / fast-cast

hp low latency reliable multicast messaging
GNU Lesser General Public License v3.0
122 stars 17 forks source link

SNDBFR unset #7

Open dmart28 opened 8 years ago

dmart28 commented 8 years ago

Hi!

private DatagramChannel ceateSocket(boolean block, int port) throws IOException {
        DatagramChannel channel = DatagramChannel.open(StandardProtocolFamily.INET)
                .setOption(StandardSocketOptions.SO_REUSEADDR, true)
                .setOption(StandardSocketOptions.IP_MULTICAST_IF, iface)
                .setOption(StandardSocketOptions.SO_RCVBUF, conf.getSocketReceiveBufferSize())
                .setOption(StandardSocketOptions.IP_TOS, conf.getTrafficClass())
                .setOption(StandardSocketOptions.IP_MULTICAST_LOOP, conf.isLoopBack())
                .setOption(StandardSocketOptions.IP_MULTICAST_TTL, conf.getTtl())
                .bind(new InetSocketAddress(port));
        channel.configureBlocking(block);
        return channel;
    }

It seems there is not set for StandardSocketOptions.SO_SNDBFR. Is it kind of bug, or it is set somewhere else?

RuedigerMoeller commented 8 years ago

That's probably an ugly fat bug (originally I had different method for creating send and receive socket). I remember wondering why modifying the size of sendbuffer does not make a difference ..

Thanks again, I'll fix that with 3.11

dmart28 commented 8 years ago

Yeah, glad to help with that one!