diff --git a/src/quicer_local_stream.erl b/src/quicer_local_stream.erl index ff78eb5e..1cda3707 100644 --- a/src/quicer_local_stream.erl +++ b/src/quicer_local_stream.erl @@ -25,6 +25,10 @@ -include("quicer_types.hrl"). +-type local_stream_opts() :: stream_opts() | proplists:proplist(). +-type cb_ret() :: quicer_stream:cb_ret(). +-type cb_state() :: quicer_stream:cb_state(). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Local Stream Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -79,10 +83,6 @@ handle_continue/2 ]). --type local_stream_opts() :: stream_opts() | proplists:proplist(). --type cb_ret() :: quicer_stream:cb_ret(). --type cb_state() :: quicer_stream:cb_state(). - -spec start_link(module(), connection_handle(), local_stream_opts()) -> gen_server:start_ret(). start_link(CallbackModule, Connection, Opts) -> start_link(CallbackModule, Connection, Opts, []). diff --git a/src/quicer_remote_stream.erl b/src/quicer_remote_stream.erl index f72c33e1..2ffbdc71 100644 --- a/src/quicer_remote_stream.erl +++ b/src/quicer_remote_stream.erl @@ -27,6 +27,10 @@ start_link/6 ]). +-type remote_stream_opts() :: stream_opts() | proplists:proplist(). +-type cb_ret() :: quicer_stream:cb_ret(). +-type cb_state() :: quicer_stream:cb_state(). + -callback init_handoff(stream_handle(), stream_opts(), connection_handle(), new_stream_props()) -> cb_ret(). %% Prepare callback state before ownership handoff @@ -82,10 +86,6 @@ handle_continue/2 ]). --type remote_stream_opts() :: stream_opts() | proplists:proplist(). --type cb_ret() :: quicer_stream:cb_ret(). --type cb_state() :: quicer_stream:cb_state(). - -spec start_link(module(), connection_handle(), remote_stream_opts()) -> gen_server:start_ret(). start_link(CallbackModule, Connection, Opts) -> start_link(CallbackModule, Connection, Opts#{is_local => false}, []).