Dan Luu
Posts: 27
Nickname: amitra
Registered: Feb, 2013
|
|
Re: Ch 13, Telnet server example (Success(...) and Failure(_))
|
Posted: Mar 3, 2013 7:05 PM
|
|
Related to this are the changes necessary to actually extract the altitude and heading.
To do that, I got a reference for the Altimeter, and then asked it (via '?') for the altitude, got the altitude, and then sent that back to the telnet server. That works fine, but it seems like a pipeTo would be a cleaner solution. Is there anything better than that?
Also, I noticed that sender points to DeadLetters inside the .onComplete block, so I had to assign sender to a val in order to get the correct ActorRef. Why is that? I'm assuming that means a new local sender is defined for that block, but why is that the case?
|
|