change interface
add connected condition
fixed #5 client connect sync
Merge branch 'hotfix/issue_#5'