c - When the new value specified for SO_RCVBUF in setsockopt() will take effect? -


My query is related to the "SO_RCVBUF" option in the SetCopy () API when the new value specified for SO_RCVBUF in SetOp () is effective Will happen?

I am testing the flow control of TCP / IP and below is my environment. The client program is a slow reader and it has a socket to test the flow control, after setting the connection to 5000 bytes Before reducing the value of SO_RCVBUF and getting data, I am decreasing it. I hope that, after sending 5000+ bytes, the client should wait for the program to read. But the server sends the program data to ~ 60000 bytes. After that the server program client will wait to read. When the customer reads 55,000 bytes, I am getting a new value to get buffer (5000 bytes).

Is it expected? I think the effect of setocketopt () should be immediate. The initial value of receiving the buffer should not have any effect after the codecot ().

Regards, Pacific

I think that you connect () Before calling, SO_RCVBUF should be set, because it happens when buffers are allocated, it does not have any effect by calling it later, or seen as a delay effect given by you can go.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -