Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
26
Issues
26
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
a08fa1d6
Commit
a08fa1d6
authored
Jun 26, 2018
by
rna
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature/congestionControl
parents
d44b6c69
fee56a70
Pipeline
#2539
passed with stages
in 1 minute and 9 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
prrt/proto/socket.c
prrt/proto/socket.c
+2
-0
prrt/prrt.pyx
prrt/prrt.pyx
+1
-3
No files found.
prrt/proto/socket.c
View file @
a08fa1d6
...
...
@@ -437,6 +437,8 @@ int PrrtSocket_close(PrrtSocket *s) {
uint32_t
PrrtSocket_get_sock_opt
(
PrrtSocket
*
s
,
const
char
*
name
)
{
if
(
strcmp
(
name
,
"targetdelay"
)
==
0
)
{
return
PrrtApplicationConstraints_get_target_delay
(
s
->
applicationConstraints
);
}
else
if
(
strcmp
(
name
,
"connected"
)
==
0
)
{
return
(
s
->
receiver
!=
NULL
)
?
1
:
0
;
}
else
if
(
strcmp
(
name
,
"maximum_payload_size"
)
==
0
)
{
return
s
->
maximum_payload_size
;
}
else
{
...
...
prrt/prrt.pyx
View file @
a08fa1d6
...
...
@@ -135,7 +135,6 @@ class PrrtCodingConfiguration:
cdef
class
PrrtSocket
:
cdef
cprrt
.
PrrtSocket
*
_c_socket
_epoch
=
datetime
.
datetime
.
utcfromtimestamp
(
0
)
_connected
=
False
def
__cinit__
(
self
,
address
,
maximum_payload_size
=
1400
,
target_delay
=
1
,
thread_pinning
=
False
):
host
,
port
=
address
...
...
@@ -203,10 +202,9 @@ cdef class PrrtSocket:
host
,
port
=
address
cdef
bytes
encodedHost
=
host
.
encode
(
"utf-8"
)
cprrt
.
PrrtSocket_connect
(
self
.
_c_socket
,
encodedHost
,
port
)
self
.
_connected
=
True
def
send
(
self
,
data
):
if
not
self
.
_connected
:
if
cprrt
.
PrrtSocket_get_sock_opt
(
self
.
_c_socket
,
"connected"
)
==
0
:
raise
Exception
(
"PrrtSocket must be connected first, before data can be sent."
)
maximum_payload_size
=
cprrt
.
PrrtSocket_get_sock_opt
(
self
.
_c_socket
,
"maximum_payload_size"
)
data_len
=
len
(
data
)
...
...
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