Added client function for receiving data from server
Added server code for calling client function