public BindResp open(Bind bind) throws BindException, IOException {
		startTimer();
		if (bind_bak != null)
			closeNotException();
		if (bind_bak != bind)
			bind_bak = bind;
		if (listenThread == null) {
			listenThread = new ListenThread(this);
			listenThread.start();
		}
		try{
			conn.open();
			connected = true;
			conn.send(bind);
			BindResp resp = (BindResp) conn.recv();
			if (resp.getResult() == 0)
				bound = true;
			else
				throw new BindException("login fiald status:"+resp.getResult());
			return resp;
		}catch (BindException exception) {
			throw exception;
		}catch (Exception e) {
			try {
				Thread.sleep(5000);
				return open(bind);//重新打开
			} catch (InterruptedException e1) { }
		} 
		return null; 
	}