Added code to support sending requests and receiving responses.