Commit 1d7c9d8b authored by Marlene Böhmer's avatar Marlene Böhmer
Browse files

enable pacing

parent 5c333cee
Pipeline #4618 failed with stages
in 1 minute and 33 seconds
......@@ -83,7 +83,7 @@ PrrtSocket *PrrtSocket_create(prrtByteCount_t maximum_payload_size, prrtTimedelt
check_mem(s);
s->nextSendTime = 0;
s->pacingEnabled = false;
s->pacingEnabled = true;
s->maximum_payload_size = maximum_payload_size;
s->isHardwareTimestamping = false;
s->interfaceName = NULL;
......
......@@ -173,10 +173,11 @@ cdef class PrrtSocket:
cdef cprrt.PrrtSocket* _c_socket
_epoch = datetime.datetime.utcfromtimestamp(0)
def __cinit__(self, address, maximum_payload_size = 1400, target_delay = 1, thread_pinning = False, hardware_timestamping_interface=None):
def __cinit__(self, address, maximum_payload_size = 1400, target_delay = 1, thread_pinning = False, hardware_timestamping_interface=None, pacing = True):
host, port = address
target_delay_us = target_delay * 1000**2
self._c_socket = cprrt.PrrtSocket_create(maximum_payload_size, target_delay_us)
cprrt.PrrtSocket_set_sock_opt(self._c_socket, "pacing_enabled", pacing)
if thread_pinning:
cprrt.PrrtSocket_enable_thread_pinning(self._c_socket)
if hardware_timestamping_interface is not None:
......@@ -224,6 +225,10 @@ cdef class PrrtSocket:
return cprrt.PrrtSocket_get_sock_opt(self._c_socket, "maximum_payload_size")
# Pacing
property pacing:
def __get__(self):
return cprrt.PrrtSocket_get_sock_opt(self._c_socket, "pacing_enabled")
property paces:
def __get__(self):
appSend = PrrtPace(cprrt.PrrtSocket_get_sock_opt(self._c_socket, "appSend_pace_internal") * 0.000001,
......
Supports Markdown
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