From e1de84585490e85166926416e4eb5cea95e0e604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 20 Aug 2020 15:29:38 +0200 Subject: Add gun_tunnel_up message to HTTP/2 CONNECT --- src/gun_tls_proxy_http2_connect.erl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/gun_tls_proxy_http2_connect.erl') diff --git a/src/gun_tls_proxy_http2_connect.erl b/src/gun_tls_proxy_http2_connect.erl index e70454a..c423571 100644 --- a/src/gun_tls_proxy_http2_connect.erl +++ b/src/gun_tls_proxy_http2_connect.erl @@ -24,14 +24,18 @@ -export([close/1]). -type socket() :: #{ + %% The pid of the Gun connection. + gun_pid := pid(), + + %% The pid of the process that gets replies for this tunnel. reply_to := pid(), + + %% The full stream reference for this tunnel. stream_ref := reference() | [reference()] }. name() -> tls_proxy_http2_connect. -%% We need different message tags because the messages -%% must be propagated to the right stream. messages() -> {tls_proxy_http2_connect, tls_proxy_http2_connect_closed, tls_proxy_http2_connect_error}. -spec connect(_, _, _) -> no_return(). @@ -49,7 +53,7 @@ send(#{gun_pid := GunPid, reply_to := ReplyTo, stream_ref := StreamRef}, Data) - -spec setopts(_, _) -> no_return(). setopts(_, _) -> -% error(not_implemented). + %% We send messages automatically regardless of active mode. ok. -spec sockname(_) -> no_return(). -- cgit v1.2.3