Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_transport.c @ 7707:db745339e54b quic
The ngx_quic_frame_len() function is not really needed.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Thu, 19 Mar 2020 14:59:55 +0300 |
parents | 1f002206a59b |
children | 83a78cca8bce |
comparison
equal
deleted
inserted
replaced
7706:1f002206a59b | 7707:db745339e54b |
---|---|
821 return NGX_ERROR; | 821 return NGX_ERROR; |
822 } | 822 } |
823 } | 823 } |
824 | 824 |
825 | 825 |
826 size_t | |
827 ngx_quic_frame_len(ngx_quic_frame_t *frame) | |
828 { | |
829 switch (frame->type) { | |
830 case NGX_QUIC_FT_ACK: | |
831 return ngx_quic_create_ack(NULL, &frame->u.ack); | |
832 case NGX_QUIC_FT_CRYPTO: | |
833 return ngx_quic_create_crypto(NULL, &frame->u.crypto); | |
834 | |
835 case NGX_QUIC_FT_STREAM0: | |
836 case NGX_QUIC_FT_STREAM1: | |
837 case NGX_QUIC_FT_STREAM2: | |
838 case NGX_QUIC_FT_STREAM3: | |
839 case NGX_QUIC_FT_STREAM4: | |
840 case NGX_QUIC_FT_STREAM5: | |
841 case NGX_QUIC_FT_STREAM6: | |
842 case NGX_QUIC_FT_STREAM7: | |
843 return ngx_quic_create_stream(NULL, &frame->u.stream); | |
844 case NGX_QUIC_FT_CONNECTION_CLOSE: | |
845 return ngx_quic_create_close(NULL, &frame->u.close); | |
846 default: | |
847 /* BUG: unsupported frame type generated */ | |
848 return 0; | |
849 } | |
850 } | |
851 | |
852 | |
853 static size_t | 826 static size_t |
854 ngx_quic_create_ack(u_char *p, ngx_quic_ack_frame_t *ack) | 827 ngx_quic_create_ack(u_char *p, ngx_quic_ack_frame_t *ack) |
855 { | 828 { |
856 size_t len; | 829 size_t len; |
857 | 830 |