- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
start_link(Shard, Subscriber) ->
gen_server:start_link(?MODULE, {server, Shard, Subscriber}, []).
start_link_client(Shard, RemoteNode, Parent) ->
gen_server:start_link(?MODULE, {client, Shard, RemoteNode, Parent}, []).
init({server, Shard, Subscriber}) ->
{ok, #server{ shard = Shard
, subscriber = Subscriber
}};
init({client, Shard, RemoteNode, Parent}) ->
{ok, #client{ parent = Parent
, shard = Shard
}}.
CHayT 12.03.2021 18:30 # 0
bormand 12.03.2021 19:07 # 0
CHayT 12.03.2021 19:17 # 0
bormand 12.03.2021 19:19 # 0
А, т.е. он "клиент" для какого-то сервера, но при этом "сервер" для кого-то ещё.
CHayT 12.03.2021 19:32 # 0
bormand 12.03.2021 18:33 # 0
Desktop 12.03.2021 18:36 # 0
CHayT 12.03.2021 18:40 # 0
DypHuu_niBEHb 12.03.2021 19:51 # 0
bormand 12.03.2021 19:57 # 0
MAKAKA 12.03.2021 19:58 # +2
guest6 12.03.2021 19:11 # 0