use of org.webpieces.nio.api.deprecated.ChannelService in project webpieces by deanhiller.
the class TestBasicUDP method setUp.
protected void setUp() throws Exception {
HandlerForTests.setupLogging();
//and started back up cleanly.....
if (chanMgr == null) {
chanMgr = ChannelServiceFactory.createDefaultChannelMgr("client");
}
if (mockServer == null) {
ChannelService svcChanMgr = getServerChanMgr();
mockServer = new MockNIOServer(svcChanMgr, getServerFactoryHolder());
}
chanMgr.start();
svrAddr = mockServer.start();
log.info("server port =" + svrAddr);
loopBack = InetAddress.getByName("127.0.0.1");
remoteAddr = new InetSocketAddress(loopBack, svrAddr.getPort() + 1);
mockHandler = MockObjectFactory.createMock(DataListener.class);
mockHandler.setDefaultBehavior("incomingData", new CloneByteBuffer());
client1 = chanMgr.createUDPChannel("ClientChannel", getClientFactoryHolder());
}
Aggregations