Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
d5c7a13a
Commit
d5c7a13a
authored
Dec 25, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement abort in the client->server direction.
parent
cc35931a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
rtpconn/webclient.go
rtpconn/webclient.go
+9
-0
static/protocol.js
static/protocol.js
+17
-0
No files found.
rtpconn/webclient.go
View file @
d5c7a13a
...
...
@@ -1144,6 +1144,15 @@ func handleClientMessage(c *webClient, m clientMessage) error {
if
!
found
{
log
.
Printf
(
"Deleting unknown up connection %v"
,
m
.
Id
)
}
case
"abort"
:
found
:=
delDownConn
(
c
,
m
.
Id
)
if
!
found
{
log
.
Printf
(
"Attempted to abort unknown connection"
)
}
c
.
write
(
clientMessage
{
Type
:
"close"
,
Id
:
m
.
Id
,
});
case
"ice"
:
if
m
.
Candidate
==
nil
{
return
group
.
ProtocolError
(
"null candidate"
)
...
...
static/protocol.js
View file @
d5c7a13a
...
...
@@ -911,6 +911,10 @@ function Stream(sc, id, pc, up) {
/**
* close closes a stream.
*
* For streams in the up direction, this may be called at any time. For
* streams in the down direction, this will be called automatically when
* the server signals that it is closing a stream.
*/
Stream
.
prototype
.
close
=
function
()
{
let
c
=
this
;
...
...
@@ -941,6 +945,19 @@ Stream.prototype.close = function() {
c
.
sc
=
null
;
};
/**
* abort requests that the server close a down stream.
*/
Stream
.
prototype
.
abort
=
function
()
{
let
c
=
this
;
if
(
c
.
up
)
throw
new
Error
(
"
Abort called on an up stream
"
);
c
.
sc
.
send
({
type
:
'
abort
'
,
id
:
c
.
id
,
});
}
/**
* Called when we get a local ICE candidate. Don't call this.
*
...
...
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