Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
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
cpp-libs
libnice
Commits
6344efa8
Commit
6344efa8
authored
Apr 23, 2014
by
Youness Alaoui
Committed by
Olivier Crête
May 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a bytestream-tcp property that is read-only for now
parent
74b16b0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
agent/agent.c
agent/agent.c
+48
-0
No files found.
agent/agent.c
View file @
6344efa8
...
...
@@ -109,6 +109,7 @@ enum
PROP_RELIABLE
,
PROP_ICE_UDP
,
PROP_ICE_TCP
,
PROP_BYTESTREAM_TCP
,
};
...
...
@@ -642,6 +643,40 @@ nice_agent_class_init (NiceAgentClass *klass)
"Use ICE-TCP specification to generate TCP candidates"
,
TRUE
,
/* use ice-tcp by default */
G_PARAM_READWRITE
));
/**
* NiceAgent:bytestream-tcp:
*
* This property defines whether receive/send over a TCP or pseudo-TCP, in
* reliable mode, are considered as packetized or as bytestream.
* In unreliable mode, every send/recv is considered as packetized, and
* this property is ignored and cannot be set.
* <para>
* In reliable mode, this property will always return %TRUE in the
* %NICE_COMPATIBILITY_GOOGLE compatibility mode.
* </para>
* If the property is %TRUE, the stream is considered in bytestream mode
* and data can be read with any receive size. If the property is %FALSE, then
* the stream is considred packetized and each receive will return one packet
* of the same size as what was sent from the peer. If in packetized mode,
* then doing a receive with a size smaller than the packet, will cause the
* remaining bytes in the packet to be dropped, breaking the reliability
* of the stream.
* <para>
* This property is currently read-only, and will become read/write once
* bytestream mode will be supported.
* </para>
*
* Since: UNRELEASED
*/
g_object_class_install_property
(
gobject_class
,
PROP_BYTESTREAM_TCP
,
g_param_spec_boolean
(
"bytestream-tcp"
,
"Bytestream TCP"
,
"Use bytestream mode for reliable TCP and Pseudo-TCP connections"
,
FALSE
,
G_PARAM_READABLE
));
/* install signals */
/**
...
...
@@ -1002,6 +1037,16 @@ nice_agent_get_property (
g_value_set_boolean
(
value
,
agent
->
use_ice_tcp
);
break
;
case
PROP_BYTESTREAM_TCP
:
if
(
agent
->
reliable
)
{
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
)
g_value_set_boolean
(
value
,
TRUE
);
else
g_value_set_boolean
(
value
,
FALSE
);
}
else
{
g_value_set_boolean
(
value
,
FALSE
);
}
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
property_id
,
pspec
);
}
...
...
@@ -1149,6 +1194,9 @@ nice_agent_set_property (
agent
->
use_ice_tcp
=
g_value_get_boolean
(
value
);
break
;
case
PROP_BYTESTREAM_TCP
:
/* TODO: support bytestream mode and set property to writable */
break
;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID
(
object
,
property_id
,
pspec
);
}
...
...
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