wip: renaming
This commit is contained in:
parent
e12466d5f2
commit
ff257ae976
@ -1,3 +1,10 @@
|
|||||||
|
OPEN LOOPS - 2025-11-12
|
||||||
|
- websockets
|
||||||
|
- separate websocket handling from websocket parsing/sending
|
||||||
|
- do renaming
|
||||||
|
- make wfc not terrible
|
||||||
|
|
||||||
|
|
||||||
VIDEO 1 - 2025-09-16
|
VIDEO 1 - 2025-09-16
|
||||||
TODONE
|
TODONE
|
||||||
- add qhl as dep
|
- add qhl as dep
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
%%% See: http://erlang.org/doc/apps/kernel/application.html
|
%%% See: http://erlang.org/doc/apps/kernel/application.html
|
||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(fd_clients).
|
-module(fd_http).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.0").
|
||||||
-behavior(supervisor).
|
-behavior(supervisor).
|
||||||
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
||||||
@ -32,17 +32,17 @@ start_link() ->
|
|||||||
|
|
||||||
init(none) ->
|
init(none) ->
|
||||||
RestartStrategy = {rest_for_one, 1, 60},
|
RestartStrategy = {rest_for_one, 1, 60},
|
||||||
ClientMan = {fd_client_man,
|
HttpClientMan = {fd_http_client_man,
|
||||||
{fd_client_man, start_link, []},
|
{fd_http_client_man, start_link, []},
|
||||||
permanent,
|
permanent,
|
||||||
5000,
|
5000,
|
||||||
worker,
|
worker,
|
||||||
[fd_client_man]},
|
[fd_http_client_man]},
|
||||||
ClientSup = {fd_client_sup,
|
HttpClientSup = {fd_http_client_sup,
|
||||||
{fd_client_sup, start_link, []},
|
{fd_http_client_sup, start_link, []},
|
||||||
permanent,
|
permanent,
|
||||||
5000,
|
5000,
|
||||||
supervisor,
|
supervisor,
|
||||||
[fd_client_sup]},
|
[fd_http_client_sup]},
|
||||||
Children = [ClientSup, ClientMan],
|
Children = [HttpClientSup, HttpClientMan],
|
||||||
{ok, {RestartStrategy, Children}}.
|
{ok, {RestartStrategy, Children}}.
|
||||||
@ -13,7 +13,7 @@
|
|||||||
%%% http://erlang.org/doc/design_principles/spec_proc.html
|
%%% http://erlang.org/doc/design_principles/spec_proc.html
|
||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(fd_client).
|
-module(fd_http_client).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.0").
|
||||||
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
||||||
-copyright("Peter Harpending <peterharpending@qpq.swiss>").
|
-copyright("Peter Harpending <peterharpending@qpq.swiss>").
|
||||||
@ -9,7 +9,7 @@
|
|||||||
%%% OTP should take care of for us.
|
%%% OTP should take care of for us.
|
||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(fd_client_man).
|
-module(fd_http_client_man).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.0").
|
||||||
-behavior(gen_server).
|
-behavior(gen_server).
|
||||||
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
||||||
@ -13,7 +13,7 @@
|
|||||||
%%% http://erlang.org/doc/design_principles/sup_princ.html#id79244
|
%%% http://erlang.org/doc/design_principles/sup_princ.html#id79244
|
||||||
%%% @end
|
%%% @end
|
||||||
|
|
||||||
-module(fd_client_sup).
|
-module(fd_http_client_sup).
|
||||||
-vsn("0.1.0").
|
-vsn("0.1.0").
|
||||||
-behaviour(supervisor).
|
-behaviour(supervisor).
|
||||||
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
-author("Peter Harpending <peterharpending@qpq.swiss>").
|
||||||
@ -36,8 +36,8 @@ start_link() ->
|
|||||||
|
|
||||||
init([]) ->
|
init([]) ->
|
||||||
RestartStrategy = {one_for_one, 1, 60},
|
RestartStrategy = {one_for_one, 1, 60},
|
||||||
Clients = {fd_clients,
|
Httpd = {fd_http,
|
||||||
{fd_clients, start_link, []},
|
{fd_http, start_link, []},
|
||||||
permanent,
|
permanent,
|
||||||
5000,
|
5000,
|
||||||
supervisor,
|
supervisor,
|
||||||
@ -60,5 +60,5 @@ init([]) ->
|
|||||||
5000,
|
5000,
|
||||||
worker,
|
worker,
|
||||||
[fd_cache]},
|
[fd_cache]},
|
||||||
Children = [Clients, Chat, FileCache, Cache],
|
Children = [Httpd, Chat, FileCache, Cache],
|
||||||
{ok, {RestartStrategy, Children}}.
|
{ok, {RestartStrategy, Children}}.
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
%% Returns an {error, Reason} tuple if it is already listening.
|
%% Returns an {error, Reason} tuple if it is already listening.
|
||||||
|
|
||||||
listen(PortNum) ->
|
listen(PortNum) ->
|
||||||
fd_client_man:listen(PortNum).
|
fd_http:listen(PortNum).
|
||||||
|
|
||||||
|
|
||||||
-spec ignore() -> ok.
|
-spec ignore() -> ok.
|
||||||
@ -32,7 +32,7 @@ listen(PortNum) ->
|
|||||||
%% Make the server stop listening if it is, or continue to do nothing if it isn't.
|
%% Make the server stop listening if it is, or continue to do nothing if it isn't.
|
||||||
|
|
||||||
ignore() ->
|
ignore() ->
|
||||||
fd_client_man:ignore().
|
fd_http:ignore().
|
||||||
|
|
||||||
|
|
||||||
-spec start(normal, term()) -> {ok, pid()}.
|
-spec start(normal, term()) -> {ok, pid()}.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user