This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
cs330_f2016:lab13genserver [2017/03/23 00:43] dhart |
cs330_f2016:lab13genserver [2017/03/24 21:03] dhart |
||
---|---|---|---|
Line 4: | Line 4: | ||
use GenServer | use GenServer | ||
+ | # Start Helper Functions (Don't Modify) | ||
def start_link() do | def start_link() do | ||
GenServer.start_link(__MODULE__, [], []) | GenServer.start_link(__MODULE__, [], []) | ||
Line 23: | Line 24: | ||
GenServer.call(name_server, {:resolve, name}) | GenServer.call(name_server, {:resolve, name}) | ||
end | end | ||
+ | #End Helper Functions | ||
Line 46: | Line 47: | ||
end | end | ||
- | def handle_cast(first_thing,second_thing,third_thing ) do | + | def handle_cast(first_thing,second_thing ) do |
| | ||
#Change the parameter names appropriately | #Change the parameter names appropriately | ||
Line 55: | Line 56: | ||
def handle_info({:DOWN, ref, :process, _pid, _reason}, state) do | def handle_info({:DOWN, ref, :process, _pid, _reason}, state) do | ||
| | ||
- | #The message received if a process went down. You will need to remove the dead process from the registry. | + | #The message received if a monitored process went down. You will need to remove the dead process from the registry. |
#Your code here | #Your code here | ||
| |