Prepare to join servers
This commit is contained in:
parent
3afaf346c7
commit
984ac15084
12 changed files with 137 additions and 17 deletions
9
lib/birdy_chat/peer_client.ex
Normal file
9
lib/birdy_chat/peer_client.ex
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
defmodule BirdyChat.PeerClient do
|
||||
use Slipstream, restart: :temporary
|
||||
|
||||
def start_link(args) do
|
||||
name = args[:peer_name]
|
||||
name = {:via, BirdyChat.PeerRegistry, {:peers, name}}
|
||||
Slipstream.start_link(__MODULE__, args, name: name)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue