Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Titanium-Web-Proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Titanium-Web-Proxy
Commits
2afbd3c7
Commit
2afbd3c7
authored
Apr 25, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the old common decoder parameter (different instances needed, which was already there)
parent
6555adc4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
Http2Helper.cs
src/Titanium.Web.Proxy/Http2/Http2Helper.cs
+4
-5
No files found.
src/Titanium.Web.Proxy/Http2/Http2Helper.cs
View file @
2afbd3c7
...
...
@@ -39,15 +39,14 @@ namespace Titanium.Web.Proxy.Http2
CancellationTokenSource
cancellationTokenSource
,
Guid
connectionId
,
ExceptionHandler
exceptionFunc
)
{
var
decoder
=
new
Decoder
(
8192
,
4096
*
16
);
var
sessions
=
new
ConcurrentDictionary
<
int
,
SessionEventArgs
>();
// Now async relay all server=>client & client=>server data
var
sendRelay
=
copyHttp2FrameAsync
(
clientStream
,
serverStream
,
onDataSend
,
sessionFactory
,
decoder
,
sessions
,
onBeforeRequest
,
copyHttp2FrameAsync
(
clientStream
,
serverStream
,
onDataSend
,
sessionFactory
,
sessions
,
onBeforeRequest
,
bufferSize
,
connectionId
,
true
,
cancellationTokenSource
.
Token
,
exceptionFunc
);
var
receiveRelay
=
copyHttp2FrameAsync
(
serverStream
,
clientStream
,
onDataReceive
,
sessionFactory
,
decoder
,
sessions
,
onBeforeResponse
,
copyHttp2FrameAsync
(
serverStream
,
clientStream
,
onDataReceive
,
sessionFactory
,
sessions
,
onBeforeResponse
,
bufferSize
,
connectionId
,
false
,
cancellationTokenSource
.
Token
,
exceptionFunc
);
await
Task
.
WhenAny
(
sendRelay
,
receiveRelay
);
...
...
@@ -57,12 +56,12 @@ namespace Titanium.Web.Proxy.Http2
}
private
static
async
Task
copyHttp2FrameAsync
(
Stream
input
,
Stream
output
,
Action
<
byte
[],
int
,
int
>
onCopy
,
Func
<
SessionEventArgs
>
sessionFactory
,
Decoder
decoder
,
ConcurrentDictionary
<
int
,
SessionEventArgs
>
sessions
,
Func
<
SessionEventArgs
>
sessionFactory
,
ConcurrentDictionary
<
int
,
SessionEventArgs
>
sessions
,
Func
<
SessionEventArgs
,
Task
>
onBeforeRequestResponse
,
int
bufferSize
,
Guid
connectionId
,
bool
isClient
,
CancellationToken
cancellationToken
,
ExceptionHandler
exceptionFunc
)
{
decoder
=
new
Decoder
(
8192
,
4096
*
16
);
var
decoder
=
new
Decoder
(
8192
,
4096
*
16
);
var
headerBuffer
=
new
byte
[
9
];
var
buffer
=
new
byte
[
32768
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment