executor.setThreadFactory(new ThreadFactory(){
int count=0;
public Thread newThread(Runnable arg0) {
return new Thread(arg0, "activeio:"+(count++));
}});
AsynchChannelFactory factory = SynchToAsynchChannelFactoryAdaptor.adapt(channelFactory,executor);
AsynchChannelServer cs = factory.bindAsynchChannel(new URI("tcp://localhost:0"));
cs = new FilterAsynchChannelServer(cs) {
public void onAccept(Channel channel) {
SynchChannel synchChannel = AsynchToSynchChannelAdapter.adapt(channel);
super.onAccept(new FilterSynchChannel(synchChannel) {
public org.activeio.Packet read(long timeout) throws IOException {