Laid groundwork for recieving messages as a client.