use of org.nustaq.fastcast.api.FastCast in project fast-cast by RuedigerMoeller.
the class MPPublisher method configureFastCast.
public static void configureFastCast() {
// note this configuration is far below possible limits regarding throughput and rate
FastCast fc = FastCast.getFastCast();
fc.addTransport(new PhysicalTransportConf("default").interfaceAdr(// define the interface
"127.0.0.1").port(// port is more important than address as some OS only test for ports ('crosstalking')
42044).mulitcastAdr(// ip4 multicast address
"229.9.9.13").setDgramsize(// datagram size. Small sizes => lower latency, large sizes => better throughput [range 1200 to 64_000 bytes]
16_000).socketReceiveBufferSize(// as large as possible .. however avoid hitting system limits in example
4_000_000).socketSendBufferSize(2_000_000));
}
use of org.nustaq.fastcast.api.FastCast in project fast-cast by RuedigerMoeller.
the class Issue4_Slow method setupFC.
public FastCast setupFC(String nodeId, String config) {
System.setProperty("java.net.preferIPv4Stack", "true");
try {
// FastCast.getFastCast();
FastCast fc = new FastCast();
fc.setNodeId(nodeId);
fc.loadConfig("./src/test/java/basic/" + config);
return fc;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
Aggregations