set connected state, prepared connection check
Merge pull request #7 from hobbyquaker/master

set connected state, prepared connection check