Also, factorise code to be executed when connection is established.
Attach a file by drag & drop or click to upload