Client struct
Read and write loops
Named tasks
Exit safely