*/
NioSocketConnector chat = new NioSocketConnector();
chat.getFilterChain().addLast("codec",
new ProtocolCodecFilter(
new TextLineCodecFactory(Charset.forName("US-ASCII"))));
chat.setHandler(new ChatProtocolHandler());
ConnectFuture cf2 = connector.connect(new InetSocketAddress(CHATHOST, 7001));
cf2.addListener(new IoFutureListener() {
public void operationComplete(IoFuture s) {
try {
if(s.getSession() != null && s.getSession().isConnected()) {