added sock type to sock_connect