public void sendMsg(String msg) throws IOException
	{
		if((msg.startsWith("[OK")||msg.startsWith("[FAIL")||msg.startsWith("[MESSAGE")))
			msg = CMStrings.replaceAllofAny(msg,DEFAULT_CRLF,' ');
		final byte[] bytes = (msg+"\r\n").getBytes();
		final ByteBuffer buf = ByteBuffer.wrap(bytes);
		while(chan.isConnected() && chan.isOpen() && (chan.write(buf)>0))try{Thread.sleep(1);}catch(final Exception e){}
	}