Updated gitignore
It can wait for socket too
Moved conditionals
Closing connections after successfull connect
Naive wait_for_response implementation.