diff --git a/src/grpcbox_stream.erl b/src/grpcbox_stream.erl index 7e9fa10..e7d271e 100644 --- a/src/grpcbox_stream.erl +++ b/src/grpcbox_stream.erl @@ -16,6 +16,8 @@ error/2, ctx/1, ctx/2, + stream_id/1, + connection/1, handle_streams/2, handle_call/2, handle_info/2]). @@ -397,6 +399,12 @@ ctx(#state{handler=Pid}) -> ctx(#state{handler=Pid}, Ctx) -> h2_stream:call(Pid, {ctx, Ctx}). +stream_id(#state{stream_id=StreamId}) -> + StreamId. + +connection(#state{connection=Conn}) -> + Conn. + handle_call(ctx, State=#state{ctx=Ctx}) -> {ok, Ctx, State}; handle_call({ctx, Ctx}, State) ->