pub test
pub base
handle response.length==0 (which means disconnect