Merge pull request #5 from weldan/master

responses status checking
handle error checking on establish socket connection