import wei.yigulu.iec104.nettyconfig.Iec104SlaverBuilder;

import java.net.InetSocketAddress;

/**
 * @author: xiuwei
 * @version:
 */
public class SlaveTest {

	public static void main(String[] args) throws Exception {
		Iec104SlaverBuilder slaverBuilder = new Iec104SlaverBuilder(2404);
		slaverBuilder.createByUnBlock();
		for (;;){
			if(slaverBuilder.getChannels().size()>0) {
				slaverBuilder.getChannels().get(0).close();
			}
			Thread.sleep(6000L);
		}
		/*slaverBuilder.getConnectFilterManager().appendFilter((c)-> {
			if (slaverBuilder.getChannels().size() > 1) {
				return -1;
			}
			return 1;
		});*/


	}


}
