Added code for the connect and accept methods. This must be run using python3.