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
4f43bd16
Commit
4f43bd16
authored
Nov 30, 2019
by
Honfika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WebSocket IsFinal flad added
parent
c46293d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
WebSocketDecoder.cs
src/Titanium.Web.Proxy/WebSocketDecoder.cs
+2
-6
WebSocketFrame.cs
src/Titanium.Web.Proxy/WebSocketFrame.cs
+2
-0
No files found.
src/Titanium.Web.Proxy/WebSocketDecoder.cs
View file @
4f43bd16
...
...
@@ -38,6 +38,7 @@ namespace Titanium.Web.Proxy
}
var
opCode
=
(
WebsocketOpCode
)(
data1
[
0
]
&
0xf
);
bool
isFinal
=
(
data1
[
0
]
&
0x80
)
!=
0
;
byte
b
=
data1
[
1
];
long
size
=
b
&
0x7f
;
...
...
@@ -61,11 +62,6 @@ namespace Titanium.Web.Proxy
}
}
if
(
size
<
0
)
{
;
}
if
(
data1
.
Length
<
idx
+
size
)
{
break
;
...
...
@@ -109,7 +105,7 @@ namespace Titanium.Web.Proxy
}
var
frameData
=
buffer
.
Slice
(
idx
,
(
int
)
size
);
var
frame
=
new
WebSocketFrame
{
Data
=
frameData
,
OpCode
=
opCode
};
var
frame
=
new
WebSocketFrame
{
IsFinal
=
isFinal
,
Data
=
frameData
,
OpCode
=
opCode
};
yield
return
frame
;
buffer
=
buffer
.
Slice
((
int
)(
idx
+
size
));
...
...
src/Titanium.Web.Proxy/WebSocketFrame.cs
View file @
4f43bd16
...
...
@@ -5,6 +5,8 @@ namespace Titanium.Web.Proxy
{
public
class
WebSocketFrame
{
public
bool
IsFinal
{
get
;
internal
set
;
}
public
WebsocketOpCode
OpCode
{
get
;
internal
set
;
}
public
ReadOnlyMemory
<
byte
>
Data
{
get
;
internal
set
;
}
...
...
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