wip: renaming

This commit is contained in:
Peter Harpending 2025-11-19 10:57:23 -08:00
parent e12466d5f2
commit ff257ae976
7 changed files with 29 additions and 22 deletions

View File

@ -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
TODONE
- add qhl as dep

View File

@ -8,7 +8,7 @@
%%% See: http://erlang.org/doc/apps/kernel/application.html
%%% @end
-module(fd_clients).
-module(fd_http).
-vsn("0.1.0").
-behavior(supervisor).
-author("Peter Harpending <peterharpending@qpq.swiss>").
@ -32,17 +32,17 @@ start_link() ->
init(none) ->
RestartStrategy = {rest_for_one, 1, 60},
ClientMan = {fd_client_man,
{fd_client_man, start_link, []},
permanent,
5000,
worker,
[fd_client_man]},
ClientSup = {fd_client_sup,
{fd_client_sup, start_link, []},
permanent,
5000,
supervisor,
[fd_client_sup]},
Children = [ClientSup, ClientMan],
HttpClientMan = {fd_http_client_man,
{fd_http_client_man, start_link, []},
permanent,
5000,
worker,
[fd_http_client_man]},
HttpClientSup = {fd_http_client_sup,
{fd_http_client_sup, start_link, []},
permanent,
5000,
supervisor,
[fd_http_client_sup]},
Children = [HttpClientSup, HttpClientMan],
{ok, {RestartStrategy, Children}}.

View File

@ -13,7 +13,7 @@
%%% http://erlang.org/doc/design_principles/spec_proc.html
%%% @end
-module(fd_client).
-module(fd_http_client).
-vsn("0.1.0").
-author("Peter Harpending <peterharpending@qpq.swiss>").
-copyright("Peter Harpending <peterharpending@qpq.swiss>").

View File

@ -9,7 +9,7 @@
%%% OTP should take care of for us.
%%% @end
-module(fd_client_man).
-module(fd_http_client_man).
-vsn("0.1.0").
-behavior(gen_server).
-author("Peter Harpending <peterharpending@qpq.swiss>").

View File

@ -13,7 +13,7 @@
%%% http://erlang.org/doc/design_principles/sup_princ.html#id79244
%%% @end
-module(fd_client_sup).
-module(fd_http_client_sup).
-vsn("0.1.0").
-behaviour(supervisor).
-author("Peter Harpending <peterharpending@qpq.swiss>").

View File

@ -36,8 +36,8 @@ start_link() ->
init([]) ->
RestartStrategy = {one_for_one, 1, 60},
Clients = {fd_clients,
{fd_clients, start_link, []},
Httpd = {fd_http,
{fd_http, start_link, []},
permanent,
5000,
supervisor,
@ -60,5 +60,5 @@ init([]) ->
5000,
worker,
[fd_cache]},
Children = [Clients, Chat, FileCache, Cache],
Children = [Httpd, Chat, FileCache, Cache],
{ok, {RestartStrategy, Children}}.

View File

@ -24,7 +24,7 @@
%% Returns an {error, Reason} tuple if it is already listening.
listen(PortNum) ->
fd_client_man:listen(PortNum).
fd_http:listen(PortNum).
-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.
ignore() ->
fd_client_man:ignore().
fd_http:ignore().
-spec start(normal, term()) -> {ok, pid()}.