add configure function for long connect