<div dir="ltr">Hello!<div><br></div><div>I am reading the Manning OTP book ( <a href="http://www.manning.com/logan/" target="_blank">http://www.manning.com/logan/</a> , <a href="https://github.com/erlware/Erlang-and-OTP-in-Action-Source" target="_blank">https://github.com/erlware/Erlang-and-OTP-in-Action-Source</a> ), and I have three questions:</div>
<div><br></div><div>In chapter 3, which is about the RPC server, I'm not sure how OTP hooks up with gen_tcp. I see that tr_server.erl calls gen_tcp:listen, but I don't see how TCP requests are passed to handle_call or handle_cast. I'm also not clear on how TCP requests are transformed into Erlang function arguments.</div>
<div><br></div><div>In chapter 6, which is about making a network cache, I'm not sure how the timeout works. I see that sc_element:handle_call gets the Starttime and Leasetime from the State variable, and computes a time left. I'm not sure how the time left variable is used to expire the cache. I thought there will be a line of code where we check if Timeleft < 0, but I can't find any such line. Is this handled inside OTP?</div>
<div><br></div><div>Thank you. I am very excited to be learning OTP</div></div>