Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
LARN
PRRT
Commits
1b531432
Commit
1b531432
authored
Oct 10, 2017
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/rttApi' into develop
parents
6f2c208b
ec881e3c
Pipeline
#1370
passed with stages
in 2 minutes and 6 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
prrt/cprrt.pxd
prrt/cprrt.pxd
+1
-1
prrt/proto/socket.c
prrt/proto/socket.c
+9
-5
prrt/proto/socket.h
prrt/proto/socket.h
+2
-0
prrt/prrt.pyx
prrt/prrt.pyx
+5
-1
No files found.
prrt/cprrt.pxd
View file @
1b531432
...
...
@@ -124,7 +124,7 @@ cdef extern from "proto/socket.h":
bint
PrrtSocket_set_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
,
const
uint32_t
value
)
uint32_t
PrrtSocket_get_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
)
bint
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
)
uint32_t
PrrtSocket_get_rtt
(
PrrtSocket
*
socket
)
cdef
extern
from
"util/bptree.h"
:
ctypedef
struct
BPTreeNode
:
...
...
prrt/proto/socket.c
View file @
1b531432
...
...
@@ -433,9 +433,13 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) {
}
bool
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
)
{
#ifdef THREAD_PINNING
return
true
;
#else
return
false
;
#endif
#ifdef THREAD_PINNING
return
true
;
#else
return
false
;
#endif
}
uint32_t
PrrtSocket_get_rtt
(
PrrtSocket
*
socket
)
{
return
PrrtChannelStateInformation_get_rtt
(
socket
->
csi
);
}
prrt/proto/socket.h
View file @
1b531432
...
...
@@ -96,4 +96,6 @@ bool PrrtSocket_closing(PrrtSocket *socket);
bool
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
);
uint32_t
PrrtSocket_get_rtt
(
PrrtSocket
*
socket
);
#endif // PRRT_SOCKET_H
prrt/prrt.pyx
View file @
1b531432
...
...
@@ -97,7 +97,6 @@ cdef class PrrtSocket:
cprrt
.
PrrtSocket_set_sock_opt
(
self
.
_c_socket
,
"targetdelay"
,
value
)
property
app_queue_size
:
def
__get__
(
self
):
if
not
self
.
isSender
:
raise
Exception
(
"Not a sender."
)
...
...
@@ -108,6 +107,11 @@ cdef class PrrtSocket:
raise
Exception
(
"Not a sender."
)
cprrt
.
PrrtSocket_set_sock_opt
(
self
.
_c_socket
,
"app_queue_size"
,
value
)
property
rtt
:
def
__get__
(
self
):
if
not
self
.
isSender
:
raise
Exception
(
"Not a sender."
)
return
cprrt
.
PrrtSocket_get_rtt
(
self
.
_c_socket
)
*
0.000001
def
recv
(
self
):
cdef
char
buffer
[
65536
]
...
...
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