Commit 1b531432 authored by Andreas Schmidt's avatar Andreas Schmidt

Merge branch 'feature/rttApi' into develop

parents 6f2c208b ec881e3c
Pipeline #1370 passed with stages
in 2 minutes and 6 seconds
......@@ -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:
......
......@@ -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);
}
......@@ -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
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment