public static void main(String[] args) throws IOException
{
ImageServerIoHandler handler = new ImageServerIoHandler();
SocketAcceptor acceptor = new SocketAcceptor();
acceptor.getFilterChain().addLast("protocol", new ProtocolCodecFilter(new ImageCodecFactory(false)));
acceptor.bind(new InetSocketAddress(PORT), handler);
System.out.println("server is listenig at port " + PORT);
}
}