make a connection and create recieving and sending threads.