Closed vturik closed 6 years ago
It seems there is a max length by default around 200kB for sending a message. To handle this, it would be required to increase the send buffer (setsockopt() with SO_SNDBUF); this would need a new API in pysctp.
The new API exposed in https://github.com/P1sec/pysctp/commit/f6bc61ef9a8f86c983ced9ef27dbfa3be8248774 enables to change the size of the send buffer:
>>> sk.send(220000*b'A')
[...]
OSError: [Errno 90] Message too long
>>> sk.get_sndbuf()
212992
>>> sk.set_sndbuf(1000000)
>>> sk.send(220000*b'A')
220000
>>> s.send(300000*b'A')
300000
>>> sk.get_sndbuf()
425984
In case you want to go over the default limit of the kernel (425984), you have to extend the value in /proc/sys/net/core/wmem_max
Thank you very much for help ))
Hi when i will try send one file or other data more than 400KB i got Error Message too long. How i can send more data with this library. Do you have work example with big files or big binary data sending ?