pythonpython-3.xsocketssctp

how use SCTP_nodelay in python?


I'm trying to use sctp_nodelay but it seems not possible in python. I looked for an exemple in the internet but only tcp_nodelay found. Someone has an idea ? thank you in advance


Solution

  • It should work out of the box by setting .nodelay to True on the socket:

    from sctp import sctpsocket_tcp
    
    sock = sctpsocket_tcp(socket.AF_INET)
    sock.nodelay = True