call connect and accept