View Source quicer_local_stream behaviour (quicer v0.2.12)

Stream initiated from local

Summary

Callbacks

Handle API call with callback state.
Handle continue from other callbacks with callback state.
Handle unhandled info with callback state.
Stream handle data
Stream now in 'passive' mode.
Handle stream 'peer_accepted'. The stream which **was not accepted** due to peer flow control is now accepted by the peer.
Handle stream peer_receive_aborted
Handle stream peer_send_aborted.
Handle stream peer_send_shutdown.
Handle send completed.
Handle stream send_shutdown_complete. Happen immediately on an abortive send or after a graceful send has been acknowledged by the peer.
Handle local initiated stream start completed
Handle stream closed, Both endpoints of sending and receiving of the stream have been shut down.

Types

-type active_n() :: boolean() | once | integer().
-type conf_handle() :: reference().
-type connection_handle() :: reference().
-type global_handle() :: quic_global.
-type listener_handle() :: reference().
-type local_stream_opts() :: stream_opts() | proplists:proplist().
-type reg_handle() :: reference().
-type stream_handle() :: reference().
-type stream_open_flags() :: 0 | 1 | 2.
-type stream_opts() ::
    #{active := active_n(),
      open_flag => stream_open_flags(),
      start_flag => stream_start_flags(),
      event_mask => uint32(),
      disable_fpbuffer => boolean(),
      stream_id => uint62(),
      priority => uint16(),
      ideal_send_buffer_size => uint64(),
      '0rtt_length' => uint64(),
      _ => _}.
-type stream_start_flags() :: 0 | 1 | 2 | 4 | 8.
-type uint16() :: 0..1 bsl 16 - 1.
-type uint32() :: 0..1 bsl 32 - 1.
-type uint62() :: 0..1 bsl 62 - 1.
-type uint64() :: 0..1 bsl 64 - 1.

Callbacks

Link to this callback

handle_call/3

View Source (optional)
-callback handle_call(Req :: term(), gen_server:from(), cb_state()) -> cb_ret().
Handle API call with callback state.
Link to this callback

handle_continue/2

View Source (optional)
-callback handle_continue(Cont :: term(), cb_state()) -> cb_ret().
Handle continue from other callbacks with callback state.
Link to this callback

handle_info/2

View Source (optional)
-callback handle_info(Info :: term(), cb_state()) -> cb_ret().
Handle unhandled info with callback state.
Link to this callback

handle_stream_data/4

View Source (optional)
-callback handle_stream_data(stream_handle(), binary(), recv_data_props(), cb_state()) -> cb_ret().
Stream handle data
-callback passive(stream_handle(), undefined, cb_state()) -> cb_ret().
Stream now in 'passive' mode.
Link to this callback

peer_accepted/3

View Source (optional)
-callback peer_accepted(connection_handle(), stream_handle(), cb_state()) -> cb_ret().
Handle stream 'peer_accepted'. The stream which **was not accepted** due to peer flow control is now accepted by the peer.
-callback peer_receive_aborted(stream_handle(), error_code(), cb_state()) -> cb_ret().
Handle stream peer_receive_aborted
-callback peer_send_aborted(stream_handle(), error_code(), cb_state()) -> cb_ret().
Handle stream peer_send_aborted.
-callback peer_send_shutdown(stream_handle(), undefined, cb_state()) -> cb_ret().
Handle stream peer_send_shutdown.
Link to this callback

send_complete/3

View Source (optional)
-callback send_complete(stream_handle(), IsCanceled :: boolean(), cb_state()) -> cb_ret().
Handle send completed.
Link to this callback

send_shutdown_complete/3

View Source
-callback send_shutdown_complete(stream_handle(), IsGraceful :: boolean(), cb_state()) -> cb_ret().
Handle stream send_shutdown_complete. Happen immediately on an abortive send or after a graceful send has been acknowledged by the peer.
Link to this callback

start_completed/3

View Source (optional)
-callback start_completed(stream_handle(), stream_start_completed_props(), cb_state()) -> cb_ret().
Handle local initiated stream start completed
-callback stream_closed(stream_handle(), stream_closed_props(), cb_state()) -> cb_ret().
Handle stream closed, Both endpoints of sending and receiving of the stream have been shut down.

Functions

Link to this function

start(CallbackModule, Connection, Opts, StartOpts)

View Source
Link to this function

start_link(CallbackModule, Connection, Opts)

View Source
-spec start_link(module(), connection_handle(), local_stream_opts()) -> gen_server:start_ret().
Link to this function

start_link(CallbackModule, Connection, Opts, StartOpts)

View Source