I have figured out the answer to my second question, the reason is in agent.cc the implementation of function connect() is commented. thanks anyway. Sencun