Set default port number to 9312, copy 2.0.8 api code

This patch updates the code to de 2.0.8 api