> Ok Francois, I have updated to the new ICS version 6 beta. I see the two
> vars you are referring to for controlling the send and recv buffer size. I
> need to be able to set them to a higher value but don't want to screw
> anything up since I've never done this before with socket code. Could you
> give me a quick way to set the new values for the send and receive 
> buffers?
> Thanks in advance Francois. A property with the word "write" would allow 
> me
> to do this I take it.

This should work:
procedure TCustomWSocket.SetSocketRcvBufSize(BufSize : Integer);
    iStatus : Integer;
    optlen  : Integer;
    optlen  := SizeOf(BufSize);
    iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, SO_RCVBUF,
                                  BufSize, optlen);
    iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, SO_RCVBUF,
                                  PChar(@BufSize), optlen);
    if iStatus = 0 then
        FSocketSndBufSize := BufSize

I'm sure you can write the other setter :-)
You can set the property only once the socket is opened. For example from 
the OnSessionConnected event handler.
Just wrote this out of my mind without testing. Please tell me if it works.

> On a different subject. Is there an easy way to turn on the TCP option for
> SACKs or selective acknowledgements? I'm going to adjust the recv buffer
> size large and if a packet gets lost and needs retransmitted I don't want
> all of the data to have to be retransmitted again if it doesnt need to be.

SACK is governed by a registry key. You can use Delphi standard registry 
functions to change it. See http://support.microsoft.com/kb/224829/ for 

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html

To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to