WHY WONT IT PARSE THE LAST FUCKING BYTE AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH
This commit is contained in:
+4
-24
@@ -10,9 +10,9 @@
|
||||
-license("BSD-2-Clause-FreeBSD").
|
||||
|
||||
-export([listen/1, ignore/0]).
|
||||
-export([start/0, start/1]).
|
||||
-export([start/2, stop/1]).
|
||||
|
||||
-include("$zx_include/zx_logger.hrl").
|
||||
|
||||
|
||||
-spec listen(PortNum) -> Result
|
||||
@@ -35,28 +35,6 @@ ignore() ->
|
||||
fd_client_man:ignore().
|
||||
|
||||
|
||||
-spec start() -> ok.
|
||||
%% @doc
|
||||
%% Start the server in an "ignore" state.
|
||||
|
||||
start() ->
|
||||
ok = application:ensure_started(sasl),
|
||||
ok = application:start(fewd),
|
||||
io:format("Starting...").
|
||||
|
||||
|
||||
-spec start(PortNum) -> ok
|
||||
when PortNum :: inet:port_number().
|
||||
%% @doc
|
||||
%% Start the server and begin listening immediately. Slightly more convenient when
|
||||
%% playing around in the shell.
|
||||
|
||||
start(PortNum) ->
|
||||
ok = start(),
|
||||
ok = fd_client_man:listen(PortNum),
|
||||
io:format("Startup complete, listening on ~w~n", [PortNum]).
|
||||
|
||||
|
||||
-spec start(normal, term()) -> {ok, pid()}.
|
||||
%% @private
|
||||
%% Called by OTP to kick things off. This is for the use of the "application" part of
|
||||
@@ -64,7 +42,9 @@ start(PortNum) ->
|
||||
%% See: http://erlang.org/doc/apps/kernel/application.html
|
||||
|
||||
start(normal, _Args) ->
|
||||
fd_sup:start_link().
|
||||
Result = fd_sup:start_link(),
|
||||
ok = listen(8000),
|
||||
Result.
|
||||
|
||||
|
||||
-spec stop(term()) -> ok.
|
||||
|
||||
Reference in New Issue
Block a user