move init_socket in constructor